Triggers
Some logic shouldn't wait to be asked for — it should just happen when something does. Drop a script into a triggered pipeline and it runs on the event, every time it fires.
Run on an event
To run a script when something happens, wire it into a pipeline that's triggered by that event. Pipelines watches for the event and fires the flow; an Execute Script node runs your script — no polling, no glue in between.
content.publishedThe event in hand
When a trigger runs, the script is handed what happened: the event's name and its full payload, as typed JSON on the script's input. Read the id that changed, the new state, whatever the event carried — and act on it.
{
"eventName": "content.metadata.state",
"eventPayload": {
"id": "9f3c…",
"state": "published"
}
}Off the main path
Triggers run asynchronously, on a worker. The operation that fired the event — a publish, an update — finishes without waiting on them. And if a trigger fails, it's retried with backoff before the failure is recorded, so a transient blip doesn't lose the work.
Keep exploring