Webhooks can be tricky to debug given the sheer number of possible connections you could make. The tips below will help you make sure your outbound webhook is set up for success.
Ensure the URL is correct
An easy thing to overlook, but always a good starting point! Make sure the full URL has been typed or copied correctly.
Choose the correct method
Webhooks can use the following HTTP request methods:
- GET
- POST
- DELETE
If in doubt, the service you're connecting to will likely mention the best method to use in their documentation, but if not, a good rule of thumb is that GET can retrieve data, POST sends data, and DELETE removes data.
You can find more information on HTTP request methods in the Mozilla web docs.
Set the correct content type
The Webhooks service supports three different content types:
- application/json
- application/x-www-form-urlencoded
- text/plain
If the incorrect content type is set, your webhook won't function as expected or may return an error, so be sure to select the content type required by the service to which you're sending your web request.
Double-check the body of your webhook
Make sure that the content you're sending fits the schema required by the service with which you're interacting.
Ensure that quotes " "
and brackets ( ) [ ] { }
are closed.
Escape any text content
The request body JSON formatting may get broken by the values in ingredients. If you are using ingredients in the Body field of the webhook action, surround them with <<< >>>
, e.g. instead of {{Username}}
put <<<{{Username}}>>>
Escaping the entire body by surrounding it with <<< >>>
may also help preserve the original formatting, including line breaks.
Ensure the response comes within 12 seconds
The timeout for Webhooks actions is currently set to 12 seconds. After IFTTT sends a web request, if the response is not received within this time frame, you'll see the below error message:
Action failure message: Timed out waiting for response from ...
Respect the terms of service
Many online services which allow webhooks also include terms of service by which you are required to abide. Failure to do so might mean that your webhook is rate-limited or your webhook access is revoked, so make sure to read the terms and/or developer documentation for your chosen service.
For more information about the Webhooks service, check out the Webhooks Service FAQ page.