Webhooks let applications communicate by sending HTTP requests. With IFTTT, you can use Webhooks to trigger Applets when an external event occurs, make requests to retrieve data through Queries, or send requests to external services through Actions.
Using Webhooks on IFTTT
The Webhooks service supports three main uses:
- Triggers: Receive a web request to start an Applet when an external event occurs.
- Queries: Make a web request and retrieve data to use in subsequent Actions.
- Actions: Send a web request to an external endpoint as part of an Applet.
How to set up a Webhooks Trigger
Follow these steps to trigger an Applet by sending a web request to IFTTT.
1. Connect to Webhooks
- Log in to your IFTTT account.
- Visit the Webhooks service and connect it to your account.
2. Create an Applet
- Click Create.
- Click Add next to If This to choose your Trigger.
- Search for Webhooks and select either Receive a web request or Receive a web request with a JSON payload.
-
Enter an event name, such as
new_userorpayment_received. You'll use this name when sending the request. - Click Add next to Then That and select the service and Action you want to run.
-
Configure the Action and finish creating your Applet.
3. Find your Webhook URL
After creating the Applet, open its details and scroll to Your webhook URL. You can copy the URL from there.
Your URL will follow one of these formats, depending on the Trigger you selected.
Receive a web request:
https://maker.ifttt.com/trigger/{event}/with/key/{webhooks_key}
Receive a web request with a JSON payload:
https://maker.ifttt.com/trigger/{event}/json/with/key/{webhooks_key}
In both formats:
-
{event}is the event name you entered when setting up the Trigger. -
{webhooks_key}is your Webhooks key.
Keep your Webhooks key private. Anyone with access to your key may be able to trigger your Applets.
4. Send a request to trigger your Applet
You can send a request manually or configure an external service to send one automatically when an event occurs.
For the standard Receive a web request Trigger, you can open the Webhook URL in your browser to trigger the Applet. To pass additional data, you can send up to three values using value1, value2, and value3.
For example, you can pass values in the URL:
https://maker.ifttt.com/trigger/{event}/with/key/{webhooks_key}?value1=hello&value2=world
You can also send these values in a JSON request body or as URL-encoded data. The values are available as the Value1, Value2, and Value3 ingredients for use in supported Query and Action fields.
For the Receive a web request with a JSON payload Trigger, send an HTTP request with a JSON body and the Content-Type: application/json header. The full JSON body is available as the JSON Payload ingredient.
What's the difference between the Webhooks Triggers?
Choose a Trigger based on the data you need to send to your Applet.
Receive a web request
Use this Trigger when you need to pass up to three values to an Applet. You can send the values in a JSON body or as URL-encoded data.
For example, a request can include:
?value1=hello&value2=world
The values are available as the Value1, Value2, and Value3 ingredients. You can add them directly to supported Query and Action fields without parsing a JSON body.
Receive a web request with a JSON payload
Use this Trigger when you need to send a structured JSON body, such as an object with multiple fields or nested objects.
For example, the request body might contain:
{
"username": "biffmcifttt",
"email": "biff@ifttt.com",
"order": {
"id": "1234",
"total": 49.99
}
}Send this data as a JSON request body with the Content-Type: application/json header to the URL that includes /json/.
The entire JSON body is available through the JSON Payload ingredient. To access specific fields in the payload, you may need to parse the JSON using filter code.
For more details, see Parsing a JSON Body with Filter Code.
How to set up a Webhooks Query
A Query lets an Applet retrieve additional data that isn't included in its Trigger. The Webhooks service offers three Queries.
Make a web request
Use this Query to send a request to an external endpoint and retrieve its status code. If the response body is in the expected format, IFTTT can also return extracted values.
Make a web request with JSON response
Use this Query to send a request and retrieve the response body as JSON. You can use filter code to parse the response and access specific fields in subsequent Actions.
History of web requests received
Use this Query to retrieve a history of web requests received by Webhooks for a specified event. The results can include the event name, values sent with the request, and the time the event occurred.
Configure a Webhooks Query
- Create an Applet and select a Trigger.
- Click the + button to add a Query.
- Search for Webhooks and select the Query that fits your needs.
- Configure the required fields, such as the URL, HTTP method, content type, headers, or request body. The available fields depend on the Query you select.
- Use the returned ingredients in subsequent Actions or filter code.
For the History of web requests received Query, enter the event name you want to look up.
For more details about the available Queries and their fields, visit the Webhooks service page.
How to set up a Webhooks Action
You can use Webhooks to send an HTTP request from an IFTTT Applet to an external endpoint.
1. Create an Applet
- Click Create.
- Select a Trigger from the service you want to use, such as receiving an email or a calendar event.
2. Add the Webhooks Action
- Click Add next to Then That.
- Search for Webhooks and select Make a web request.
3. Configure the request
Enter the details required by the receiving endpoint:
- URL: The endpoint that should receive the request.
-
Method: The HTTP method required by the endpoint, such as
POST. -
Content Type: The format of the request body, such as
application/jsonorapplication/x-www-form-urlencoded. - Additional Headers: Any required headers. Set the content type in the Content Type field instead.
- Body: The data you want to send with the request.
Check the external service's documentation for the required URL, method, headers, and body format.
4. Test the Applet
Finish creating your Applet, then perform the Trigger event. Check the receiving service to confirm that it received and processed the request.
If the request fails, see Troubleshooting outbound webhooks.
Troubleshooting Webhooks Applets
If an Applet isn't triggering, try the following steps.
Check your Webhook URL
- Open the Applet from My Applets.
- Find Your webhook URL in the Applet details.
- Confirm that the URL contains the correct event name and Webhooks key.
- If you're using the JSON-payload Trigger, make sure the URL includes
/json/after the event name.
Test the request
Visit the Webhooks documentation page and use the testing tools to send a request for your event.
- Use To trigger an Event with 3 JSON values to test the standard Receive a web request Trigger.
- Use To trigger an Event with an arbitrary JSON payload to test Receive a web request with a JSON payload.
You can include test data to check whether the Applet runs as expected.
Regenerate your Webhooks key
If the URL is correct but your Applet still isn't triggering, try regenerating your Webhooks key.
- Visit Webhooks settings.
- Click Regenerate key.
- Update any existing Webhook URLs that use the old key.
- Test your Applets again.
Important: Regenerating your key invalidates your previous Webhook URLs. Update any external services that use those URLs.
Troubleshoot outbound webhooks
If an Applet runs but the external service doesn't receive or process the request, see Troubleshooting outbound webhooks for additional steps.