A trigger node type has a reserved event input
What happened outside the workflow enters a run on one known port. A reader can find it without knowing anything about the trigger, and an editor can treat it the same way on every trigger.
The rule
- A trigger node type MUST declare one input port named
event. - The schema of that port MUST be the schema of the event the node type delivers.
- The
eventparameter MUST be connectable, required and not configurable. - It MUST have no default, and its
when_missingflag (CFG-20) MUST beskip. - The
eventport MUST be exposed, and an instance-level exposure setting MUST NOT hide it. - A node type that is not a trigger node type MUST NOT declare an input port named
event.
What it means
A trigger node is a node that starts runs when something happens outside the
workflow: a record is saved, a schedule comes due, a webhook arrives. Whatever an
implementation does to notice the event, the event reaches the run in one place, the
node's event input. The trigger node then turns it into its outputs like any other
node.
The port is reserved in both directions. Every trigger node type has it, and no other node type has it. So the presence of an event input is how a reader, or an
editor, recognises a trigger node.
Each flag has a job. Connectable and exposed let a value from outside reach the
parameter (CFG-4). Required with skip means a trigger that did not fire leaves
itself out of the run (CFG-21). Not configurable and no default mean nothing but the
start of the run can fill it. No wire can fill it either (R16).
Example
{
"event": {
"connectable": true,
"configurable": false,
"required": true,
"when_missing": "skip"
}
}{ "ports": { "input": { "event": false } } }