Webhook Target
The webhook target posts to any HTTP webhook endpoint whenever an automation fires. Any external system that accepts incoming webhooks can be connected to OpenDataDSL automations this way.
| Id | Name | Template | Icon |
|---|---|---|---|
odsl.webhook | Send a webhook message | send a message to a webhook at [url] using [template] | wifi text-orange |
The target works with any service and any action. It supports property-change filtering but not @transformer.
Inputs​
| Input | Description |
|---|---|
url | The webhook URL to post to |
template | A mustache template for the message |
Message formatting
In the current automation handlers, the triggering data is posted to url as JSON and the template input is not applied. The receiving system gets the raw JSON data, not a formatted message. This target also does not support @transformer. Set template because the target asks for it, but do not rely on it to format the payload.
Example: notify an external system when a dataset is complete​
- ODSL
- REST API
a = AutomationBuilder("dataset", "private", "MY.PROVIDER.FEED").build()
c = SimpleObject()
c.source = "private"
c.service = "dataset"
c.id = "MY.PROVIDER.FEED"
c.action = "complete"
conds = []
conds.add(c)
a.conditions = conds
a.target = "odsl.webhook"
a.template = "When 'MY.PROVIDER.FEED' is complete, send a message to a webhook at [url] using [template]"
a.icon = "wifi text-orange"
a.properties.url = "https://integration.mycompany.com/hooks/odsl"
a.properties.template = "dataset-complete-message"
a.enabled = true
save ${automation:a}
POST https://api.opendatadsl.com/api/automation/v1
{
"target": "odsl.webhook",
"template": "When 'MY.PROVIDER.FEED' is complete, send a message to a webhook at [url] using [template]",
"icon": "wifi text-orange",
"enabled": true,
"conditions": [
{
"source": "private",
"service": "dataset",
"id": "MY.PROVIDER.FEED",
"action": "complete"
}
],
"properties": {
"url": "https://integration.mycompany.com/hooks/odsl",
"template": "dataset-complete-message"
}
}
Choosing between webhook and other targets​
| Target | Best for |
|---|---|
odsl.webhook | Any external system with an incoming webhook |
odsl.teams | Microsoft Teams channels |
odsl.jira | Creating JIRA tasks |
odsl.email | Email notifications |
odsl.queue | Your tenant's message queues |
Related pages​
- Automation Basics: how automations work, conditions and templates
- Creating Automations: step-by-step guide to setting up automations
- Teams Target: post to a Microsoft Teams channel
- Queue Target: send data to a queue for downstream systems
- Custom Targets: fix the webhook URL for your team
- Automation Targets: overview of all available targets