Create IFTTT action

This action sends PubNub events to the IFTTT (If This, Then That) service to trigger automations (applets) across services and devices.

IFTTT uses triggers ("this") and actions ("that"). An event from one service can trigger an action in another. You can automate tasks without writing code.

For example, you can forward selected messages to Slack. As an inventory manager, you can get a Slack alert when a customer asks about a product. This helps you understand demand quickly.

Integrating IFTTT with PubNub involves these steps:

  • Configure an IFTTT webhook triggered by PubNub events.
  • Create an IFTTT action that passes the event to a target service.
  • Create a PubNub action in Events & Actions that calls the webhook.
  • Add a PubNub listener in Events & Actions as the event source.

Create an IFTTT account

Go to https://ifttt.com/, click Sign up, and follow the prompts.

Prepare your IFTTT environment

Follow these steps to set up an applet with a webhook:

  1. Sign in and click Create (top right).
  2. In If This, click Add to create a webhook trigger.
  3. Search for Webhooks and select it.
  4. Choose Receive a web request.
  5. Enter an Event Name. You will use this name in the Admin Portal in Event Name.
  6. Click Create trigger.
  7. In Then This, click Add and choose the action service you want to trigger.
  8. Configure the action’s parameters for the chosen service.
  9. Click Create action.
  10. Review the applet and click Finish.

Find your IFTTT webhook key

  1. Go to the Webhooks service page and click Documentation.
  2. The page shows your unique webhook key. You will need it in the Admin Portal.

Configure Admin Portal

  1. In the Events & Actions view on the Admin Portal, click + Add Action.
  2. Select Webhook IFTTT as the action type.
  3. In Event Name, enter the event name you set in the IFTTT webhook.
  4. In IFTTT Webhook key, enter your webhook key from the IFTTT Webhooks documentation, for example, c-6oz3G_IPCjb6mGqTpz1d.
  5. (Optional) Enable and configure retries in Webhook IFTTT retry.
  6. (Optional) Add HTTP headers your webhook request requires.
  7. Pair the action with an event listener in Actions. Click Add event listener and select an existing listener or create one.
  8. Click Save changes.
Last updated on