Webhook
Webhook is a method utilized by applications to supply real-time information to other apps. Such a process usually delivers data immediately as and when it occurs. Webhook Trigger enables users to receive callouts whenever a service provides the option of distributing signals to a user-defined URL.
Categories: Helpers
Type: webhook/v1
Actions
Response to Webhook Request
Name: responseToWebhookRequest
Converts the response to the webhook request.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| responseType | Response Type | STRING OptionsJSON, RAW, BINARY, REDIRECT, NO_DATA | The type of the response. | false |
| headers | Headers | OBJECT Properties{} | The headers of the response. | false |
| body | Body | OBJECT Properties{} | The body of the response. | true |
| body | Body | STRING | The body of the response. | true |
| body | Redirect URL | STRING | The redirect URL. | true |
| body | Body | FILE_ENTRY | The body of the response. | true |
| statusCode | Status Code | INTEGER | The status code of the response. | false |
Example JSON Structure
{
"label" : "Response to Webhook Request",
"name" : "responseToWebhookRequest",
"parameters" : {
"responseType" : "",
"headers" : { },
"body" : {
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
},
"statusCode" : 1
},
"type" : "webhook/v1/responseToWebhookRequest"
}Output
The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.
Triggers
Auto Respond with HTTP 200 Status
Name: autoRespondWithHTTP200
The webhook trigger always replies immediately with an HTTP 200 status code in response to any incoming webhook request. This guarantees execution of the webhook trigger, but does not involve any validation of the received request.
Type: STATIC_WEBHOOK
Output
null
JSON Example
{
"label" : "Auto Respond with HTTP 200 Status",
"name" : "autoRespondWithHTTP200",
"type" : "webhook/v1/autoRespondWithHTTP200"
}Webhook Trigger Execution Modes
Use the static workflow webhook trigger URL for this trigger type. This URL becomes available only after the workflow is published and deployed. Any request sent to this endpoint will immediately receive an HTTP 200 OK response, ensuring the workflow is triggered without validating the incoming request.
Validate and Respond
Name: validateAndRespond
Upon receiving a webhook request, it goes through a validation process. Once validated, the webhook trigger responds to the sender with an appropriate HTTP status code.
Type: STATIC_WEBHOOK
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| csrfToken | CSRF Token | STRING | To trigger the workflow successfully, the security token must match the X-Csrf-Token HTTP header value passed by the client. | true |
Output
null
JSON Example
{
"label" : "Validate and Respond",
"name" : "validateAndRespond",
"parameters" : {
"csrfToken" : ""
},
"type" : "webhook/v1/validateAndRespond"
}Webhook Trigger Execution Modes
Use the Static workflow webhook trigger URL for this trigger type. This URL becomes available only after the workflow is published and deployed. Incoming requests are first validated by checking the CSRF token sent in the X-Csrf-Token HTTP header. If validation succeeds, the workflow is executed and the sender receives an HTTP 200 OK response.
Await Workflow and Respond
Name: awaitWorkflowAndRespond
You have the flexibility to set up your preferred response. After a webhook request is received, the webhook trigger enters a waiting state for the workflow's response.
Type: STATIC_WEBHOOK
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| csrfToken | CSRF Token | STRING | To trigger the workflow successfully, the security token must match the X-Csrf-Token HTTP header value passed by the client. | true |
| timeout | Timeout (ms) | INTEGER | The incoming request will time out after the specified number of milliseconds. The max wait time before a timeout is 5 minutes. | false |
Output
null
JSON Example
{
"label" : "Await Workflow and Respond",
"name" : "awaitWorkflowAndRespond",
"parameters" : {
"csrfToken" : "",
"timeout" : 1
},
"type" : "webhook/v1/awaitWorkflowAndRespond"
}Webhook Trigger Execution Modes
Use the Static workflow webhook trigger URL for this trigger type. This URL becomes available only after the workflow is published and deployed. Incoming requests are first validated by checking the CSRF token sent in the X-Csrf-Token HTTP header. After successful validation, the workflow starts executing, but the HTTP response is delayed until the Webhook/Response to Webhook Request component is reached. In that component, users can define the exact response body, status code, and output returned to the sender.
How is this guide?
Last updated on
Webflow
Webflow is a web design and development platform that allows users to build responsive websites visually without writing code.
WhatsApp is a free-to-use messaging app offering end-to-end encrypted chat, voice, and video communication, along with document and media sharing, available on multiple platforms.