Receive data from webhook trigger let’s you handle any HTTP request to complete an automation.
When you add a new trigger, you can find the receive data from webhook trigger under the AutomatorWP integration.
Next, click on the “webhook” button and the trigger configuration will be displayed like this:
The trigger provides a webhook URL that you may use to perform the HTTP requests.
You can use the webhook URL on your project, web services like Zapier or Integromat or in a Send data to webhook action (from your site, or from other site you have Webhooks add-on installed).
Inside fields you can setup the expected request parameters this webhook will receive. For each field, you can setup pairs of the expected field key and the field type.
User assigned to the trigger
You can configure the way to determine the user that is completing the trigger in 3 ways:
Logged-in user ID: If you check this option, then the trigger will assign the logged-in user (on WordPress Rest API) as the user that is completing the trigger. For this method, you probably may need to check the WordPress Rest API authentication chapter.
User ID from fields: If the user ID that should get assigned to the trigger comes inside the webhook fields, then you need to set the field type as “is the user ID” on field that represents the user ID.
User email from fields: If the user email that should get assigned to the trigger comes inside the webhook fields, then you need to set the field type as “is the user email” on field that represents the user email.
At bottom of the receive data from webhook form, you have the Get samples button. You can use this button to listen for incoming webhooks and set the fields automatically.
If a request is received at the webhook URL, you’ll see a dialog that shows the data received, and clicking on “Use these fields” button will add them to the trigger:
Additionally, Webhooks add-on includes exclusive logs to store all incoming webhooks. You can find these logs on AutomatorWP -> Webhooks logs menu.
Inside each log entry you are able to meet from which URL has come the webhook, the request method and all parameters received.
Additionally, will let you know the logged-in user (to let you test if user gets logged-in correctly on the WordPress rest API) and the user that has been assigned on the trigger.
You can check the automations samples page where you can see some samples of the possibilities of this add-on.