IFTTT integration

IFTTT (If This Then That) integrations enable you to trigger conditional chains, and help to combine various services together when an event occurs in Ably.

Create a IFTTT integration

To create an IFTTT integration in your dashboard:

  1. Login and select the application you wish to integrate with IFTTT.
  2. Click the Integrations tab.
  3. Click the New Integration Rule button.
  4. Choose Webhook.
  5. Choose IFTTT.
  6. Configure the IFTTT settings.
  7. Click Create.

You can also create an IFTTT integration using the Control API.

Settings

The following settings are available when creating an IFTTT integration:

SettingDescription
IFTTT Webhook keyThe webhook key for your IFTTT account.
Event nameThe name used to identify the IFTTT applet.
SourceSpecifies the event types being sent to IFTTT.
Channel filterFilters the source channels based on a regular expression.
EncodingSpecifies the encoding format of messages. Either JSON or MsgPack.

Restrictions

IFTTT has limitations on the data it can process. All payloads must be JSON and use only the keys value1, value2, or value3. Any other format or additional keys will not be processed.

As a result, enveloping, "batching":/docs/platform/integrations/webhooks#batching are not supported. Additionally, protocols that require decoding such as MQTT, are not supported with IFTTT.

To ensure data is processed by IFTTT, it must match the required IFTTT structure. The following example shows the headers and payload sent to IFTTT when a message is sent to a channel:

JSON

1

2

3

4

5

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

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

Payload:

JSON

1

2

3

4

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