Per-recipient workflow trigger data
Today we're releasing an extension to our workflow trigger API: the ability to supply per-recipient trigger data. Previously, the data
field supplied to your workflow trigger was shared across all recipients, meaning that if you wanted to supply recipient-specific data, you had to do so by either triggering a workflow per-recipient, or by stuffing data onto the user's profile.
Now, with the introduction of per-recipient trigger data, you can supply recipient-specific trigger data for up to 1000 recipients at a time via the workflow trigger API. The per-recipient trigger data will be merged onto the base workflow trigger data, making it easy to still supply shared data to all recipients of your workflow while providing anything recipient-specific.
Here's an example, where we're supplying a recipient-specific dashboard URL to the workflow. In this example, when the workflow runs for esattler
, it will merge the contents of their trigger data onto the base data
, so the dashboard_url
will be https://dashboard.jurassic.park/esattler
.
{
"data": {
"dashboard_url": "https://dashboard.jurassic.park",
"alert_type": "dinos-roaming",
"alert_id": "1234567890"
},
"recipients": [
{
"id": "esattler",
"$trigger_data": {
"dashboard_url": "https://dashboard.jurassic.park/esattler"
}
}
]
}
Fixes and improvements
- π [API] We fixed an issue where the user deletion API could sometimes respond with an inconsistent status code.
- π [SDK] We fixed an issue where the Python SDK would not correctly handle JSON errors from particular versions of the
requests
library.