Skip to main content
Version: 11.x

Webhook

The webhook data source provides a webhook which you can use to send information in real-time to a connected template. Both GET and POST requests are accepted.

Set up the datasource​

  • Go to Templates -> Datasources, click Add datasource -> Create new and select Webhook.
  • Name the datasource and click Create.
  • Its Webhook Url is generated; click Copy to copy it.
  • Connect this datasource in Template Creator, bind your text or image elements and Save the template.

GET
Use one of these formats:

  • Arbitrary query fields, which become JSON properties you can bind using JSONPath.
  • A single nonempty message parameter for the Message binding.
  • A single nonempty json parameter containing URL-encoded JSON.

Do not combine a nonempty message or json with each other or with other query fields.

POST
For a JSON POST, send a nonempty object with Content-Type: application/json. Arrays, scalar values and empty objects are not accepted. An object containing only message, such as { "message": "Welcome" }, is supplied to the Message binding as that value. Other objects can be mapped with JSONPath.

note

Messages are transient, they are only available to templates connected at the time of sending.
Data should be encoded in UTF8.

Template settings​

Under Datasource settings for this template, Visibility time (0 for always) controls how long received data stays visible. Enter a positive number of seconds to clear it automatically, or 0 to keep the latest displayed data while the template remains loaded. Each new displayed value restarts the timer.

An optional Data transformation script can adjust received data before the template uses it.

Use Message for message text, JSONPath value for values in structured data, JSON - Image for image URLs, or JSON - QR code for QR code content.

Incoming messages can also trigger Interactions in a prepared template.