Automation targets
An automation target is what an automation does: send an email, send a message to a queue, post to Teams, run a process, build a curve and so on. OpenDataDSL provides the common targets, extensions add their own (Validation adds Run validation checks, Composer Build composition), and your company can create its own, such as Northgate's Send to the Northgate ETRM.
The Targets tab
The Targets tab lists every target you can use: OpenDataDSL's, your extensions', and your company's own. When your company has a target with the same id as an OpenDataDSL one, yours replaces it.

| Column | What it shows |
|---|---|
| Target | The target's name and id. Yours marks your company's own targets |
| Does | Its description, and the sentence its automations end with |
| Works with | The services whose items can trigger it (any, or a list) and the actions it can be used for (anything, or a list). Can transform means its automations can transform the data with a mustache script first, property change that they can fire only when a property has a value |
| Settings | What each automation of the target needs. Hover over a setting for its description. Fixed lists the settings the target sets for every automation |
| Used by | How many automations use the target |
Select Automations to open the Automations tab filtered on the target, Extend to make a target of your own from it, and, on your own targets, Edit to change it.
How targets shape the New tab
When you create an automation, the New tab only offers the targets whose Works with includes the item's service, and for each of them only the actions it works with. At Northgate, Send to the Northgate ETRM works with data updates only, so it is offered for a curve, but not for a process or a report.
Common targets
| Target | Id | Settings |
|---|---|---|
| Send an email | odsl.email | to, subject |
| Send an email with an attachment | odsl.email_attachment | to, subject, attachmentName |
| Send a message to a queue | odsl.queue | queue |
| Send a Teams message | odsl.teams | url, template |
| Send a webhook message | odsl.webhook | url, template |
| Run a process | odsl.process | process |
The settings of every OpenDataDSL target, with examples, are described in Automation targets. The Targets tab always shows the targets and settings available to you.
Your own targets
Your company can make its own targets in two ways:
| Way | Use it to | Example |
|---|---|---|
| Extend a target | Fill in some settings of an existing target for everyone, so users only fill in the rest | Send a Teams message, with the Market Data channel's address already filled in |
| Run your own script | Do anything an ODSL script can, with settings users fill in on each automation | Increment a counter field on a master data record |
Your targets are private: only your company sees and uses them. They are offered on the New tab like any other target. Their id is publisher.code, and a target with the same id as an OpenDataDSL one replaces it for your company, for every automation that uses it.
Extending a target
Northgate's market data team posts to the same Teams channel from many automations. Rather than paste the channel's webhook address into every one, Priya makes a target with it filled in.
- On the Targets tab, select Extend on Send a Teams message.
- Fill in the target's details (see the field table below): publisher
northgate, codeteams_market_data, name Tell the market data channel. - In Settings, enter the channel's webhook address as the Fixed value of
url. A fixed setting is set for every automation of the target, and users are not asked for it. - The sentence still contains
[url], which users would now see unfilled, so the form warns about it. Select Write the fixed values in, then reword the sentence:send a Teams message to the Market Data channel using [template]. The preview shows how it reads on the New tab. - Select Create target.

The new target runs the same built-in handler as the one it extends, with your fixed settings. Users now pick Tell the market data channel on the New tab and only choose the message template.
A setting the original target already fixes (such as attachment on Send an email) is copied with it. Change it only if you know what the handler does with it.
Running your own script
A script target runs one of your ODSL scripts each time an automation fires. Inside the script:
| Variable | What it holds |
|---|---|
#PROPERTIES | The settings: those users filled in on the automation and the target's fixed ones, plus id (the item), ondate (for curves) and range (for timeseries), which the platform always adds |
#OUTPUT | The data that triggered the automation (the item as it was saved) |
#LOG | The run's log entry. Its status comes from the script: the run fails when the script fails (for example with fail "the record was not found") and succeeds otherwise |
This script increments a counter field on a master data record. Its first comment puts it in the category automation-target, which is what makes it appear in the list of scripts when you make a target:
/** Increments a counter field on a master data record @category automation-target */
print "Running custom target"
oid = #PROPERTIES.objectid
counterfield = #PROPERTIES.counter
// Increment a counter
bulk update ${object} where _id=oid
inc(counterfield=1)
end
Save it as a private script, here automations\increment-counter, then make the target:
- On the Targets tab, select New script target.
- Fill in the details: publisher
northgate, codeinc_counter, name Increment a counter, iconnode-plus. - Choose the script in ODSL script (start typing to see your automation target scripts) and select Read the script. Every
#PROPERTIES.namethe script uses is added as a setting, hereobjectidandcounter. Describe each one: users see the description when they fill it in. - Write the sentence, with each setting users fill in as
[name]:increment counter [counter] in record [objectid]. - Under Works with, untick Any action and tick is updated, and untick Can transform the data first: the script does not use the data.
- Select Create target.

The target saved by the form:
{
"_id": "northgate.inc_counter",
"publisher": "northgate",
"code": "inc_counter",
"name": "Increment a counter",
"description": "Increment a counter in a master data record",
"icon": "node-plus",
"script": "automations\\increment-counter",
"template": "increment counter [counter] in record [objectid]",
"tags": ["Custom"],
"inputs": {
"objectid": {"description": "The id of the record to update"},
"counter": {"description": "The name of the field to increment"}
},
"properties": {},
"services": ["*"],
"actions": ["update"],
"allowTransformation": false,
"allowPropertyChange": true
}
The platform sets an ODSL script's description and category from its first comment each time it is saved: the text is the description, and @category name (one word) the category. A script without @category automation-target in its first comment is not listed.
Open a new automation that uses the target and select Run now to try it. Its status and message are on the Activity tab.
The target form
| Field | What it is |
|---|---|
| Publisher and Code | Together the target's id, publisher.code. Letters, numbers, - and _. The publisher defaults to your company's. They cannot be changed once the target exists |
| Name, Description | What users see when they choose a target |
| Icon | A Bootstrap icon name, such as microsoft-teams or node-plus |
| Tags | Words to group targets by, comma separated |
| Built-in handler or ODSL script | What runs. An extended target keeps the handler or script of the one it extends; a script target runs the script you choose. The list offers your ODSL scripts in the category automation-target (private, and public ones starting with #); you can type another id, and the form warns that it is not an automation target script |
| Settings | One row per setting: its name, description and type (text, yes or no, a mustache script, or a list of choices). Leave Fixed value empty for a setting users fill in; fill it in to set it for everyone. id, ondate and range cannot be used: the platform sets them |
| Sentence | How automations of the target end, such as send a message to [queue]. Each setting users fill in goes in as [name]; a setting that is not in the sentence is optional |
| Works with | The services whose items can trigger it and the actions it is offered for. Can transform the data first offers the transformed sentences (a mustache script turns the data into another format first); Can fire only when a property has a value offers the property change and property set sentences |
The form checks the details as you type: a [name] in the sentence that is not a setting, a fixed setting still in the sentence, or a setting users fill in that the sentence leaves out.
Changing and deleting your targets
Select Edit on one of your targets to change it, then Save. The change applies to every automation that uses the target from its next run.
To delete a target, select Delete in the form. The confirmation says how many automations use it. Those automations fail every time they run until you create the target again or delete them, unless your target replaced an OpenDataDSL one with the same id: they then use that one again.
OpenDataDSL's and your extensions' targets cannot be changed here; extend them instead. See also Custom targets.