Please be aware that you are viewing our bleeding edge unstable documentation. Unless you wanted to view the bleeding edge (and possibly unstable) documentation, we recommend you use our stable docs.

Go to Ably's stable canonical documentation »

I know what I'm doing, let me see the bleeding edge docs »

You are viewing our bleeding edge unstable documentation. We recommend you use our stable documentation »
Fork me on GitHub

IFTTT

As part of Reactor Events, it is possible to integrate with various systems via webhooks.

IFTTT allows for simple conditional chains, helping to combine various services together. Ably can integrate into IFTTT through their webhooks functionality.

Tutorials & Examples

If you would like to just dive in and see an example of this being implemented, then take a look at our IFTTT tutorial.

For more details on the specifics of how Reactor Events and our integrations work, check out our Reactor Events documentation.

Rule fields

IFTTT Webhook key
Your IFTTT account’s unique webhook key. This is obtained from going to their Webhooks page, then going to Documentation
Event name
The Event name is used to identify the IFTTT applet that receives the Reactor Event, make sure you write the same name when creating the IFTTT applet
Headers
Optional headers to send along with any message
Source
Choose which events on channels should activate this Reactor Event Rule. Currently IFTTT rules only support message and presence due to the restrictions detailed below
Channel filter
An optional filter, which allows the Rule to be applied to a restricted set of channels. This can be specified as a regular expression, allowing for swathes of channels to be used
Encoding
The encoding to be used by this Rule. This can only be JSON for IFTTT due to the restrictions detailed below

Restrictions

IFTTT has limitations on the data it can process. All payloads are expected to be JSON, with keys of value1, value2, or value3. A payload of anything besides JSON, or any key:values beyond these cannot be processed.

Due to this, we do not support enveloping, batching, or MsgPack encoding for IFTTT. In addition, any communication which requires decoding on the other end, such as messages sent via MQTT will not be able to pass data on to IFTTT.

In addition, if you are wanting data to be passed through and processed by IFTTT, you will need to ensure relevant data matches the above structure. For example, the data of a message or presence message sent through IFTTT should conform to the following structure:

{
  "value1" :"data I want to send 1",
  "value2" :"data I want to send 2",
  "value3" :"data I want to send 3"
}

In the future we would like provide transformation capabilities, allowing for data sent on channels to be re-structured prior to being sent to an endpoint. For IFTTT, this would allow for channel communication to not need to adhere to the IFTTT data structure expectations. If this would be of interest to you, please get in touch.

Example

For a message data or presence message data of { "value1": "My first message", "value2": "My second message"}, the following would be sent to your IFTTT endpoint:

Headers:

host: https://maker.ifttt.com/trigger/{YOUR_EVENT}/with/key/{YOUR_IFTTT_KEY}
content-type: application/json
x-ably-envelope-appid: {YOUR_APP_ID}
x-ably-envelope-channel: {YOUR_CHANNEL}
x-ably-envelope-rule-id: {YOUR_RULE_ID}
x-ably-envelope-site: {ably-server-location}
x-ably-envelope-source: channel.message
x-ably-message-encoding: json
x-ably-message-id: {UNIQUE_ABLY_MESSAGE_ID}
x-ably-message-timestamp: {TIMESTAMP_ORIGINAL_MESSAGE_WAS_SENT}
x-ably-version: 1.0
content-length: 18
connection: keep-alive

Payload:

{
  "value1": "My first message",
  "value2": "My second message"
}

Back to top