Streamr integration with Zapier: Tutorial

Introduction to Zapier

So, what exactly is Zapier? The short version is that it is a platform that serves as a bridge between two apps. In doing so it can send data (with HTTP post) from one app to another.

The long version is as follows: In Zapier, an integration between two apps is called a zap. A zap always begins with a trigger (e.g. a new item in some RSS feed), which is where the data comes from. After the trigger, there will be an action that dictates the steps you are seeking to accomplish given the trigger. This structure makes Zapier ideal for discrete events that occur somewhat infrequently.

Potential use cases

As for use cases, I dare say that the limitation is your imagination. You could build anything ranging from a simple RSS feed listener to a social media data monitoring tool. Basically, data from almost any app or website you can imagine can be sent to Streamr through Zapier. I’ll list some potentially interesting data Streams that the Streamr Marketplace could benefit from:

  • Twitter Streams that trigger whenever any user creates a new Tweet that contains a specific search term.
  • Youtube Streams that trigger whenever a new video is posted on a specific channel.
  • Streams from any service that uses webhooks.

Streamr-app

Our integration with Zapier is done through an app that Juuso Takalainen and I created in Zapier using the developer tools that they provide, and it’s called Streamr. Its action it undertakes is simple: it “Sends to Streamr”. As a user, your task is to create a zap that you find useful by combining a trigger with one or more actions.

As of now, the Streamr-app can only be used as the app responsible for the action, in other words, Streamr can’t be the trigger. However, Streamr could potentially also be the source of a trigger and another app could be the one to receive this data. If the need for this arises, it is something we can implement. For those who are interested, we have a step-by-step tutorial for creating a zap just below.

Step-by-step tutorial

To start off, you need to create an account on Zapier. Then proceed to make a new zap through the orange button found on the top right corner of the website.

Make a Zap!

Note: Streamr app might be still pending for approval to be listed as public app. You can still access it by simply visiting this invitation url once you are logged into Zapier https://zapier.com/platform/public-invite/4961/b0e30d4fee0469ff49af508a2a418edd/

The next step is choosing the trigger app. In this tutorial, we will create a Streamr Stream that gets updated whenever a new item shows up in a specific RSS feed. Feel free to deviate and select a different trigger app that better matches your interests.

In this example, we are using RSS by Zapier as the source of the trigger.

Select the specific trigger you want. Some Zapier apps offer multiple choices to choose from.

This is the trigger we want.

In our context, we will have to provide the URL for the RSS feed as the next operation. You might have to do something different depending on the trigger app you chose. Note that some apps may require you to authenticate to their service at this point.

The most viewed news in the New York Times.

Once you submit, Zapier will ask you to review your fields one more time before performing a test on the trigger. If you’d like to see the contents of the test, press the link “view your item”.

Smooth sailing!

At this point, we’re already halfway through. We’ve configured everything there is regarding the trigger. So naturally the next step is choosing the action app. Search for Streamr.

Note: Streamr app might be still pending for approval to be listed as public app. You can still access it by simply visiting this invitation url once you are logged into Zapier https://zapier.com/platform/public-invite/4961/b0e30d4fee0469ff49af508a2a418edd/

At the time of writing, the Streamr-app is still private.

“Send to Streamr” action is selected by default. Leave it as it is.

“Send to Streamr” action.

Earlier I mentioned the possible need for authentication from the trigger app side. Here we need authentication from the action app side, which is in this case, Streamr. On the screen below you can see that I have configured a connection beforehand. You’ll need to establish a new connection via authenticating to Streamr. Do this by clicking the “Connect an Account” button.

Connecting your Streamr account to Zapier.

Zapier will ask for an API key. If you don’t have a Streamr account yet, create one now. Check out this tutorial by Henri Pihkala if you’re new to Streamr. It is the first issue of a three-part tutorial to Streamr. I highly recommend reading all of them, but for our purposes today the first part is enough. We’re mainly interested in the following sections:

  • Creating your first Stream
  • Finding your API keys

You can ignore the part about using node.js to interact with Streamr. The reason being the fact that we’re doing it for you this time through Zapier. So, create an API key, pluck it in the field and we’re good to go.

API Key required.

Now Zapier will ask you for the Stream ID. Copy it from your Stream and paste it into the first field shown below. As you might have noticed already, I chose to extract the title, the description and the link from the data. By pressing the hamburger button (yes that is what we call it in the industry) with a plus sign on it you’ll be able to see all the different parts of the data. Select the ones you want to prioritise and name the fields accordingly. Press the plus button to add more fields.

Configuring the data.

After all that we can finally test the zap out by sending a test to the Stream.

Send the test!

The screen below is what you should be seeing after sending the test.

The test was successful!

Finally, you’ll see something like this once you turn your zap on with the slider:

Green lights all the way!

Brilliant, now you know how to create a zap! On the Streamr side, you should be seeing something like the screenshot below. You will most likely see exactly one event listed under the ‘Recent Events’-section. This is because the test we sent earlier did exactly that. As long as your zap is running, it will automatically check for new triggers and send the corresponding data to your Stream.

Then proceed with the ‘Configure Fields’-button found next to the blue text. Choose ‘Autodetect’ to automatically detect the fields that your Stream is receiving.

Configuring the fields automatically.

If you’ve made it this far, congratulations, you definitely deserve a break afterward. However, we still have one more tiny thing to do; placing the cherry on top, so to speak. Navigate to the Streamr Marketplace and create a new product. Select the new Stream we just created and add it to the product. You can even publish the product if you think there’s demand for it.

The Stream on the Marketplace.

What makes Zapier worthwhile?

What makes Zapier handy is the fact that it provides ready-made integrations to over a thousand different apps and websites. On top of that, the UI for creating a zap is quite intuitive and easy to use.

When working on the Zapier integration I was also informed that there was this other service called IFTTT. In terms of infrastructure, it is very similar to Zapier, which is to say the basis of IFTTT is also comprised of triggers and actions. However, the reason why we chose Zapier over IFTTT (at least initially) is that IFTTT required us to implement a new API endpoint, while Zapier was more compatible right off the bat.

There is, however, one category in which IFTTT beats Zapier hands down and that is the pricing. Outside of the initial trial of 14 days that Zapier offers, the mileage you can expect to extract is quite limited. For instance, you are limited to only running five zaps at any given time. IFTTT, on the other hand, is completely free (to my understanding at the moment). In the near future, if the stars align, we might revisit IFTTT.

A snippet from the IFTTT documentation indicating the need for a new endpoint URL.

Conclusion

Zapier makes integrations with Streamr seem trivially easy. This is made possible by the numerous integrations they have already established beforehand and their user-friendly UI. Keeping the Streamr Marketplace in mind, the main use cases we are interested in are Streams that send data from various social media sites to Streamr. However, pricing is a factor that is holding Zapier back from being the perfect integration platform. It could also have trouble with triggers that fire too frequently.