Purpose
The Webhook node allows you to send data from your flow to an external API or service. This is useful for integrating with third-party systems, triggering other workflows, or saving data to your own database.
Configuration
- Webhook URL: Enter the URL of the external service you want to send data to.
- Method: Choose the HTTP method:
- GET: Appends data to the URL as query parameters.
- POST: Sends data in the request body, typically as JSON. This is the most common method for sending data.
- Headers (Optional): Add any required HTTP headers, such as
Authorization
for API keys (e.g.,Bearer YOUR_API_KEY
) orContent-Type
(e.g.,application/json
). - Body (for POST): Define the JSON data you want to send. You can use flow variables here. Example:
{"name": "{{name}}", "email": "{{email}}"}
Response Mapping
After the webhook is sent, the external service will return a response. You can map parts of this response back into new flow variables.
- Add Mapping: Click "Add Mapping" to create a new mapping rule.
- Response Key: Use dot notation to specify the path to the data in the JSON response (e.g.,
data.user_id
). - Variable Name: Enter the name of the new flow variable you want to save the data into (e.g.,
{{customer_id}}
).
This new variable can then be used in subsequent nodes in your flow.