1. Ably FAQs
  2. Integrations
  3. Events, Webhooks and Functions

Set up a Zapier workflow to publish into an Ably channel

It's possible to trigger an action in Ably (publishing a message to a channel) as part of a Zap workflow setup in Zapier. Follow these steps to set up a Zapier workflow that publishes to an Ably channel.

 

1. Head to your Zapier dashboard and create a Zap. If you're unfamiliar with Zapier, check out this introduction by Zapier.

 

2. Choose an app & trigger event

In order to publish a message into Ably, an event in another app must happen first. In this example we've chosen Google Sheets as our app and a new worksheet as our trigger.

 

3. Choose the app and action to trigger, in this case Ably

Search for and select Ably in the "Choose App" section. Then choose Publish message in the "Choose Action Event" section.

Note that there are two action choices: publish message and publish push notification. See step 6 for more detail.

 

4. Hit continue and you will be prompted to sign into Ably...

...and provide an Ably API key:

 

5. Access your Ably API Keys

Each Ably app has its own API key. You will need to provide the API key for the app you want Zapier to publish into. All apps are listed within your account dashboard page. Follow these steps to access an application dashboard page:

 

A. Login

Visit https://ably.com/login and enter your login details. If you don't have an account, you will need to create a free account.

B. Once logged in successfully, you will be taken to your account dashboard page which will list the apps within your account. Click on the app you want to use to publish from Zapier

C. You'll be shown the app dashboard page with tabs to access settings and features for the app.

Select API Keys and click "Show" to reveal your API Key. Copy the API Key.

Note you must click "Show" in order to reveal your correct API Key as the dashboard obscures the API Key by default.

D. Navigate back to the Zapier request for an Ably API Key, paste your key in, and hit continue

You'll be back in your Zapier dashboard with your Ably account ID now showing. Click "Continue".

 

6. Customize your message

Fill out the fields as you see fit. Note that the fields will depend on whether you chose Publish Message or Publish Push Notification in step 3. See below the screenshot for more detail.

 

Publish Message. This action takes event name, channel name & message payload as input. Example:

"inputData": {
"event_name": "match",
"channel_name": "espn",
"message_content": "Arsenal vs Man Utd",
"message_payload_pair": "{ "match" : "Arsenal vs Man Utd" }"
}
 

The above lets you publish a message to the channel. Please refer to the documentation for more info: https://ably.com/docs/realtime/channels.

 

Publish Push Notification. This action takes event name, channel name, message payload & a set of notification fields as input. Example:

"inputData": {
"event_name": "match",
"channel_name": "push",
"message_payload": "This is normal message payload",
"notification_payload": [{"noti_title": "Goal", "noti_body": "Scored by Auba", "noti_data": "This is data to be sent to a background process" }]
}
 

You can use this option to publish both -  a normal message, as well as a push notification to a push-enabled channel on Ably. Please refer to the documentation for more info: https://ably.com/docs/general/push/publish.

 

7. Test your new Zap

Once set up, we need to test if the Zap works correctly and publishes a message into Ably.

Hit "Test & Continue". You can monitor the incoming message publish in the Ably Dev Console in your Ably dashboard.

And that's it, you've now connected Zapier to Ably.

---

Still facing issues? We'll be happy to help you out, please reach out to us via https://ably.com/support

 

Learn more about Zapier < > Ably and other integrations with Ably.