IFTTT

As part of Webhooks, 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.

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 webhooks and our integrations work, check out our Webhooks documentation.

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 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 of channel.message, channel.presence, channel.lifecycle, or channel.occupancy events on channels should activate this event rule.
Channel filter
An optional filter on channel name, to restrict the channels the rule applies to. Use a regular expression to match multiple channels.
Encoding
The encoding to be used by this rule. This can only be JSON for IFTTT due to the restrictions detailed below

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" }
Copied!

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.

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.2 content-length: 18 connection: keep-alive
Copied!

Payload:

{ "value1": "My first message", "value2": "My second message" }
Copied!
Tutorials & Examples