Skip to content
On this page

Webhook

Info

NameValue
Object IDwunderautomation.webhook
GroupAdvanced

Description

The Webhook action sends data from a workflow to a remote HTTP endpoint. The webhook action supports the GET, POST and PUT HTTP methods. When the POST or PUT methods are used, key/value data defined in the action will be sent in the HTTP body. When the GET method is used, the HTTP body will be empty.

Data format

Data is either formatted as traditional x-form/urlencoded format (Default) or JSON. The Content-Type HTTP header is set accordingly:

FormatContent-Type
Defaultapplication/x-www-form-urlencoded
JSONapplication/json; charset=utf-8

Authentication

The webhook action supports three different forms of authentication on the remote web service.

MethodDescription
Basic authThe incoming request must provide a Authenticationheader according to the Basic auth standard based on the username and password specified in the trigger settings.
Header keyThe incoming request must provide a secret key in a separate HTTP header. The name of the header and the secret key are specified in the trigger settings.
HMACThe incoming request must provide a HMAC header that signs the entire request. The name of the header and the secret used to for signing it are provided in the trigger settings.

Example

The screenshot below shows a Webhook action set up with method: POST, format: JSON, url: https://api.example.com/v1/order for an order with ID: 12345 that exists in the runtime context. The authentication method is set to Basic and a username and password are supplied.

Webhook action in WunderAutomation

This will cause the following HTTP request to be sent out:

bash
POST /v1/order HTTP/1.1
Host: api.example.com
Content-Type: application/json; charset=utf-8
Authorization: Basic dXNlcjpwYXNzd29yZA==

{
  "id":"12345",
   "key":"abc123",
   "email":"customer@example.com"
}

Released under the MIT License.