Ably adds native integrations for Zapier, IFTTT, and Cloudflare Workers

michaeladekunle

Michael Ade-Kunle

Posted on March 17, 2020

Ably adds native integrations for Zapier, IFTTT, and Cloudflare Workers

A common requirement in realtime messaging applications is for developers to be able to insert some business logic into a message processing pipeline. Typical use-cases might be to perform filtering or payload transformation on a message-by-message basis, either when first ingested into the messaging service, or as part of a rule that captures messages from one channel, applies the business logic, and then forwards the message to another channel.

Ably supports these use-cases through Reactor Integration rules that invoke cloud functions (e.g. AWS Lambdas or Google Cloud Functions). By providing a gateway to cloud functions from cloud services providers, we believe we provide the best available mechanism for these use-cases while making it easier to build with the ecosystems you’re already operating in.

That’s why as of today Ably integrates with three new services, allowing you to act on realtime events in the Ably network by triggering actions and executing business logic across Zapier, IFTTT, and Cloudflare Workers. And, in the case of Zapier, publish to an Ably channel as part of a Zap workflow.

enhance-integ-zap-tftt-cflare-blog-01.0@2x-1-.jpg

Why these three services?

Ably’s developer community already uses Reactor Integrations for a bunch of useful things like creating a profanity filter with AMQP and Neutrino or triggering serverless functions in AWS Lambda. With Zapier, IFTTT, and Cloudflare Workers even more things become possible.

Zapier is a natural integration for us to support as so many developers, including us at Ably, already have sophisticated workflows set up on the platform to connect and automate over 1,300 disparate business services.

IFTTT is the perfect example of how event-driven thinking is permeating both the business and personal digital worlds: it helps connect and automate apps and devices, with a focus on personal smart home devices and mobile apps.

And Cloudflare Workers is Cloudflare’s answer to serverless functions. Workers lets you build apps by deploying serverless code to data centers across 200 cities in 90 countries, with no need to think about regions. We’re already using Cloudflare Workers at Ably and we’re excited to partner with Cloudflare on this.

If you’re familiar with Reactor Integrations and want to jump right in, check out the following links. If you need a bit of background then read on.

How these new integrations work

All three integrations essentially use webhooks to communicate with these services. You can set up a Reactor Rule in your app dashboard to control exactly how and what you wish to communicate with your endpoint. This can vary from the data you want to send (message or presence events), which of your channels to send from, and which endpoint to send to. Once that’s done, Ably handles the logic, execution, and delivery.

reactor-dashboard.png

Our documentation goes into specifics about rule fields, enveloping, and batching. We also provide examples so it’s best to familiarize yourself with the relevant sections:

Bidirectional triggers, kind of

Reactor Integrations have typically been one-way: an event in Ably triggers an action in another system. But with Ably’s first official Zapier integration an event can now trigger an action in Ably (publishing a message to a channel) as part of a Zapier workflow.

To add Ably to a Zap, check out our step-by-step instructions.

Screenshot-2020-03-11-at-13.03.05.png

IFTTT has known limitations

The IFTTT integration is fully functional but the capabilities are more limited than other integrations. This is down to how IFTTT accepts HTTP requests.

Usually, Reactor Integrations take any data published on an Ably channel and allow it to be forwarded to an endpoint, stream, or other system. This is because Ably expects publishers (e.g. an IoT device) to publish payloads on channels in a way that makes sense to them, and the subscriber (e.g. a Reactor Integration) to be able to parse that data and use it.

Unfortunately, IFTTT expects and accepts only a specific format of JSON. This means the publisher and subscriber are very tightly coupled, limiting the capabilities of this integration. Please read the IFTTT documentation for more info on this.

If you do set up an IFTTT Reactor Integration and face problems, please get in touch and we’ll do what we can to help overcome IFTTT’s current limitations.

How Reactor Integrations work

If you're not too familiar with how Ably’s Reactor Integrations work, here's a short overview. There are three integration types:

  • Events trigger actions in other systems based on realtime events that occur in Ably. They’re designed for low to medium volumes of data and encompass Webhooks, serverless functions, and now Zapier, IFTTT, and Cloudflare Workers.
  • Queues are our AMQP/STOMP queueing services. Ably hosts these. They help our users to consume high-frequency realtime messages that need to be further processed and transformed. We’ve written about how queues relate to pub/sub and overcoming difficulties of FIFO in distributed systems.
  • Firehose provides enterprise-only integrations into streaming and queueing systems our customers are already using such as Amazon Kinesis, Apache Pulsar, Rabbit MQ, and AWS SQS.

diagram-reactor-landscape@2x.png

For each integration there are certain events that can trigger a Reactor Integration rule to execute:

  • Messages trigger function calls as soon as they’re published on a channel.
  • Presence events trigger function calls when clients enter, update their data, or leave channels.
  • Channel lifecycle events (batched messages only for now). When a channel is created (following the first client attaching to this channel) or discarded (when there are no more clients attached to the channel), the lifecycle event is streamed.

We’re investing in more integrations

At Ably we strive to make the complex simple. We released our first ever integrations to remove the frustration and complexity that comes with building, maintaining, and scaling multiple services and environments. We’ve supported Webhooks along with native integrations with services like AWS Lambda, Azure Functions, and RabbitMQ for a while.

Adding additional integrations gives our customers, who increasingly operate across a fragmented landscape of platforms and services, the flexibility to use the best-in-class services and compute they’re already working with while Ably handles the complexity and scale of doing so. We’re working on more Reactor Integrations, which will be coming throughout 2020 so keep an eye out.

This release brings the total number of native Ably’s Reactor Integrations up to twelve. When combined with Webhook support this means we’re able to provide a gateway to countless discrete pieces of business logic and code, some of which you might already be running.

And if you do something cool with these new integrations, be sure to let our Dev Rel team know - they’re always looking for ways to promote members of our developer community.

💖 💪 🙅 🚩
michaeladekunle
Michael Ade-Kunle

Posted on March 17, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related