Tasks
Create Webhook
Create an explicit webhook
Webhooks are a way to trigger a task from an external system.
This task creates an explicit webhook.
There are 2 types of webhooks:
- Implicit - using the stubref as part of the URL which is set via action meta webhooks
- Explicit - using a webhook URL with a uuid that is created by this task.
Webhook will be in the format https://webhooks.stubber.com/ex/{{uuid}}
.
Basic usage
Create a simple webhook to trigger an action eg. log_request_to_sheet
.
Parameters
required String
action_name - Name of the action the webhook will execute.
- The webhook will not execute an action if it is not available in the state.
required String
stubref - This is a reference for what stub to execute in.
- You can only create webhooks for stubs your org owns.
optional UUID
webhookuuid - A custom uuid you would like to use for your webhook.
- If not provided, a random uuid will be generated and returned as a result of this task.
This is useful if you want to provide a link to your webhook before even creating it.
Result
Properties
UUID
lid A predefined set of data used in webhooks.
JSON
payload - Will contain all query parameters if the webhook is called via GET.
- Will contain request body if the webhook is called via POST.
Examples
Here are some more complex examples:
Executing webhook with GET request
GET requests query params gets passed through as payload.
Result
Executing webhook with POST request
GET requests body gets passed through as payload.