Language
Triggers
Connect resources to graphs to start workflow execution.
A trigger binds a resource to a graph. When the resource fires, the graph executes with the resource's payload as input.
For defining resources, see Resources. For defining graphs, see Graphs.
Syntax
trigger name {
resourceType:resourceName -> graphName
enabled: true
}Resource types: form, webhook, schedule, agent.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| binding | resourceType:name -> graph | Yes | The resource-to-graph binding. |
| enabled | boolean | No | Whether the trigger is active. |
Examples
Form trigger:
trigger on_contact {
form:contact_form -> process_form
enabled: true
}Webhook trigger:
trigger on_webhook {
webhook:inbound -> handle_webhook
enabled: true
}Schedule trigger:
trigger daily_run {
schedule:daily_report -> generate_report
enabled: true
}Rules
- The referenced resource (
form,webhook,schedule) must be defined in the same file or project. - The referenced graph must be defined.
- A graph can have multiple triggers (for example, triggered by both a form and a schedule).
- Trigger names must be unique.