Zapier plugin for NEAR Protocol

What happens when you combine a progressive open source blockchain platform designed for fast and convenient development of decentralized applications (dApps) and the most popular integration platform that helps businesses automate everyday workflows and create a connection between web applications? Right! We will get Zapier and NEAR blockchain integration. Learn about how the plugin was developed and how you can use it to your advantage.

What are plugins and why are they needed?

Plugins are small software codes that complement the functionality of the main application for which they are created. Simply put, these are add-ons, additions or fixes, thanks to which the original program becomes better (more functional) from the point of view of a particular user.

The peculiarity of modules is that they do not work independently, but are add-ons that work inside the main program. At the same time, the base program for which plug-ins are created can do just fine without them.

What is the purpose of plugins?

It may seem strange why developers do not immediately implement all the necessary functionality into their applications. After all, creating new modules, installing them, updating them means doing extra work on setting up and it is much easier to use one finished product.

Indeed, it is much easier, but not more expedient. Individual plugins perform 3 important functions:

 
1) Give individual settings to applications

Each person can use any program in different ways and for different purposes. The use of plugins makes it possible to tailor a specific program to the preferences and needs of a specific audience.

2) Reduce the size and speed up programs

If all programs are initially released with a full package of all kinds of functions, they will become very large and take up extra space, which will greatly reduce the positive experience from using these programs.

3) Allow programs to be improved

The use of a modular scheme in the work of programs, where each plug-in can be enabled or disabled without causing disruptions in the operation of the main functions, allows you to improve programs not only by developers, but also by other programmers.

A little more about Zapier

Zapier is an automation platform, described in their words as:

Easy automation for busy people. Zapier moves info between your web apps automatically, so you can focus on your most important work.

It lets you connect multiple APIs into a single workflow (which is called a Zap), so it is very convenient for automating repetitive tasks, or just setting up notifications independent of the API you are using. These APIs range from Google Sheets, Microsoft Office to Dropbox, Slack and many more.

All of these apps are composed of triggers, searches and creates. These represent the types of actions that can be performed on those APIs.

Trigger

Triggers represent actions that read from the API, and instantiate the Zap when they recognize a change in the response data. They can read in two ways:

  • By polling the data, which is the most common way.
  • By subscribing to a webhook on the API, in order to get notified from the API, rather then keep asking for data.

Search

Searches also represent actions that read from the API, but unlike triggers, they do not poll or listen to data changes, rather they are fired from other inputs, such as the output of a trigger, another search, a create or user input.

Create

Creates are actions that, as their name suggests, create new data on the API. Examples of creates are:

  • Writing a new row to a spreadsheet
  • Posting a message on a Slack channel
  • Creating a contact entry in Google Contacts

Why NEAR?

NEAR is a new layer 1 blockchain that solves some of the problems existing blockchains have. More specifically NEAR is a sharded, proof-of-stake, layer-one blockchain that is simple to use, secure and scalable.

Like Polkadot, Solana and Avalanche NEAR tries to solve the three main problems of today's popular blockchains:

  1. Cost - current blockchains are expensive to use and maintain;
  2. Low throughput - current blockchains are slow to process transactions and execute smart contracts;
  3. Hard to scale - current blockchains don't scale well to high traffic.

If you want to learn more about NEAR, head over to their website, or directly to their university to learn about the technology and how to use it.

How Zapier was chosen for the integration

All the platforms are being chosen primarily based on their popularity among both the users and the developers, as well as their range of supported environments (like mobile) and other API integrations.

We previously covered NEAR integration with the popular Webflow and AppGyver platforms, which are in the top 10, according to an annual report by Codemap below of the no-code/low-code industry.

Zapier has been identified among the top 3 automation/integration tools in the same report by CodeMap (see the table below for more details).

The end result of the Zapier integration is a meme-museum-tracker where every time a new meme appears, a user pays X amount of NEAR tokens to his friend.

Our developer shares his experience of creating a plugin for NEAR

Overall the process of developing an integration for Zapier was quite enjoyable, a bit of repetitive work here and there, but not too bad. Their approach to creating integrations is quite adaptable since they allow you to use pretty much anything that can run on the serverless environment (AWS Lambda to be exact).
Their documentation is not as eye opening as I would have liked. And when I say eye opening I mean that there were still some nuances left for me to dig into, whether through their codebase or by trying things out, instead of them just straight up explaining what certain things do. For example I didn't realize that Triggers are the only actions that can be used to start a Zap, yes their name implies that they trigger a Zap but nowhere does it say that it's not allowed for Searches to do that too. That might just be me being used to how other platforms work (cough, cough Integromat cough, cough).
Another thing is that I wish they provided the functionality that I created manually out of the box, meaning providing you with type definitions for fields, functions and actions. I found the help of those type definitions quite useful, even though they do not convey the whole schema validity or restrictions, they do enough to speed up the process.
The NEAR side of things was mostly good in terms of the RPC API, but the client documentation was not as comprehensive as I thought it should be. The quick reference and cookbook provided offer some good information and example use cases, but for anything outside of that you are left to yourself. The typedocs give you explanations of the library structure and they tell you the what and the how of the functionalities, but they don't show you usage examples and they don't make all of the functionality easily discoverable. So some of the use cases I had required me to jump between the typedocs, the RPC docs and the source code of the library, which I didn't find difficult but do think is not the ideal user experience especially for people just getting started with NEAR. Ideally, everything should be documented in one place for ease of readability, understanding and discoverability.
All in all I can say that the integration process was definitely not boring, I had fun developing and learning the platform and I believe anyone with prior experience with either platform could easily do the same in no time. I hope that Zapier integrates some of the features that I talked about earlier, and I'm sure that the NEAR docs will only get better.

Below you can watch a demo video that describes the functionality of the plugin. We wish you a pleasant viewing!