19 Dec 2024 11:40 AM
All,
Thanks for a great "2024 community year", see you in 2025!
And, one more for the road,
From the documentation:
An API call can always trigger a workflow independent of the trigger type.
You can run a workflow triggering it using params and input as data, so would it be nice to add the "event" as a data option, for testing?
(or if regular trigger is event => input will be used as event)
Best wishes and see you in the new year!
Solved! Go to Solution.
19 Dec 2024 12:40 PM
Hi Henk,
event is actually part of the params. So you can add the event property as part of the params to manually trigger a workflow with your own event payload. The event data in params will be available under the event() expression as usual.
This is actually exactly what happens when you manually run a workflow with an event trigger, and the UI asks you to provide a sample event.
Also, if you check out an execution of an event triggered workflow, you can see the event payload as part of the params. So the payload for the API triggered workflow /workflows/{id}/run would be
{
"input": {},
"params": {
"event": {
"event.id": "-804131061630612141_1734610595013V2",
"timestamp": "2024-12-19T12:16:48.191000000Z",
"display_id": "P-24124496",
"event.kind": "DAVIS_PROBLEM",
"event.name": "Network availability monitor global outage",
...
}
}
}
See you in the new year!