Create IFTTT action

This action lets you pass PubNub events to the IFTTT (If This, Then That) service to create chains of simple conditional statements (applets) and use them to automate actions between different services and devices.

IFTTT works on the principle of triggers ("this") and actions ("that"), where an event from one service (like PubNub) or device can automatically trigger an action in another, allowing users to automate repetitive tasks without needing to know how to code.

For example, you can use IFTTT as a proxy between PubNub and Slack and repost selected messages - as an inventory manager, you might want to get notified via Slack of any queries PubNub customers make on a chosen product item and, as a result, understand your customer needs better.

Integrating IFTTT with PubNub involves these steps:

  • Configuring an IFTTT webhook triggered based on incoming PubNub events.
  • Creating an IFTTT action that passes the incoming PubNub events to a chosen external service.
  • Creating a PubNub action under Events & Actions that triggers the IFTTT webhook.
  • Adding a PubNub event listener under Events & Actions as an event source for the PubNub action.

Create an IFTTT account

Go to https://ifttt.com/, click the Sign up button, and follow the prompts to create a new account.

Prepare your IFTTT environment

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

  1. Once logged in, click the Create button in the top right corner.
  2. Click on Add in the If This section to create a webhook trigger.
  3. Search for Webhooks and select it.
  4. Choose the Receive a web request trigger.
  5. Enter an Event Name for the web request. You'll use this name in the Admin Portal for the Event Name configuration.
  6. Click on Create trigger.
  7. Now, Click on Add in the Then This section and choose the action service you want to trigger. You can search for services or select one from the suggested services portfolio.
  8. Set up the parameters for your action based on the chosen service. This configuration can involve selecting certain options or entering specific values relevant to the action.
  9. Click on Create action.
  10. Review your applet and select Finish to save it.

Find your IFTTT webhook key

  1. Head to the Webhooks service page and click Documentation.

  2. The page will show your unique webhook key that you'll need to fill out the IFTTT configuration in the Admin Portal.

Configure Admin Portal

  1. In the Events & Actions view on the Admin Portal, create an action by clicking the + Add Action button.

  2. Select Webhook IFTTT as the action type.

  3. In the Event Name field, enter the event name you specified earlier when setting up the IFTTT webhook.

  4. In the IFTTT Webhook key field, enter your unique webhook key found in the Webhooks documentation on IFTTT, like c-6oz3G_IPCjb6mGqTpz1d.

  5. Optionally, enable and configure retries through Webhook IFTTT retry.

  6. Optionally, configure any additional HTTP headers your webhook request might require.

  7. Pair your action with an event listener without leaving the Actions view. To do this, click the Add event listener button and select an existing event listener or create a new one.

  8. Save your newly created action by clicking the Save changes button.

Last updated on