Skip to content

IFTTT triggers

The Receive data from IFTTT webhook trigger starts a recipe when an IFTTT applet sends a web request to your site. Anything IFTTT supports, such as a new row in a Google Sheet, an email with a specific subject in Gmail, or a new post on your Facebook page, can then run actions in WordPress. This article covers adding the trigger, setting up IFTTT’s Make a web request action, and telling the recipe which data to expect. To send data the other way, from a recipe to IFTTT, see IFTTT actions.

The trigger requires Uncanny Automator Pro.

Add the trigger to an Everyone recipe

IFTTT sends its data anonymously, not as a logged-in WordPress user, so the trigger works only in a recipe of the Everyone type. See Recipe types: logged-in users and everyone.

  1. In your WordPress dashboard, go to Automator > Add new recipe, select Everyone, and click Confirm.
  2. Click Add trigger. In the picker, search for IFTTT, select it, and select Receive data from IFTTT webhook.
  3. In the Set up step, copy the Webhook URL with the copy button beside it.

The top of the Set up step of the Receive data from IFTTT webhook trigger with the Webhook URL and its copy button, Data format set to Auto, and an empty Security headers table

Keep the recipe open in its browser tab. You come back to it to finish the trigger after setting up IFTTT.

Set up IFTTT’s Make a web request action

  1. In IFTTT, set up the If This part of your applet with the trigger that should send data to your site.
  2. In the Then That part, choose Webhooks > Make a web request.

IFTTT's Make a web request action with the URL, Method, Content Type, Additional Headers, and Body fields

  1. In the URL field, paste the Webhook URL from the recipe.
  2. In the Body field, define the data to send. IFTTT needs you to format it by hand:
    1. Click Add ingredient to insert each value from your If This trigger that you want to send.
    2. Surround each ingredient with <<< and >>> so it is sent exactly as it is.
    3. Before each ingredient, type one word that names it, followed by =. This word becomes the key in Automator.
    4. Put & between one ingredient and the next.

    Because IFTTT sends each ingredient exactly as it is, a value that itself contains & or = breaks the body.

A finished body looks like this:

The Body field of IFTTT's Make a web request action with four named ingredients joined by ampersands

  1. Set Method to POST and Content Type to application/x-www-form-urlencoded, or leave Content Type empty. Do not set it to application/json: your site rejects a key=value body that claims to be JSON. Leave the other fields at their defaults and click Create action.

Finish the trigger

Back in the recipe, set Data format to x-www-form-urlencoded, because the body you built above is made of key=value pairs joined by &. The field opens on Auto, which reads such a body only when no value contains a space, and IFTTT ingredients such as titles usually do.

Then tell Automator which data to expect from IFTTT. You can type the keys in yourself, or let the trigger’s Test step capture them from a real request.

Enter the fields by hand

  1. In Fields, the table opens with one empty row. Enter the first Key (the word you typed before the ingredient) and choose its Type.
  2. Click Add pair for each further ingredient and fill in its row the same way.

The Fields table of the IFTTT trigger with the keys from, body, subject and time and their types, followed by the Response options, Custom trigger label, and the Test and Save buttons

  1. Click Save.

Or capture a sample with the Test step

  1. Keep the recipe switched off (Recipe off). The test listens only while the recipe is off.
  2. Click Test, then Listen for webhook. The test listens for one minute.
  3. Run your IFTTT applet, for example by making its If This event happen.
  4. When the request arrives, the test shows Test passed with the keys and values it received. Click Use these fields and confirm with Use these fields: the builder returns to the Set up step with a row in Fields for each key. Click Save.

If the request arrives but its values are missing, check that Data format in Set up is x-www-form-urlencoded and that IFTTT’s Content Type is not application/json (see above). Incoming webhook triggers describes every field in the Set up step.

Complete the recipe

  1. Add the actions that should run when IFTTT sends data, inserting the keys as tokens with the ∗ button. If an action needs a WordPress user, set up the Run recipe as card to match an existing user or create a new one; see Recipes for Everyone.
  2. Switch the recipe on with the Recipe on switch in the top bar.

When the applet runs, IFTTT sends the data to your site and the recipe runs its actions.

Related: IFTTT actions, Incoming webhook triggers, Testing triggers and actions, Recipes for Everyone

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top