Workflows
Triggers
Connect resources to workflows to start workflow execution.
What it is. The glue between the outside world and a workflow. A trigger binds a resource to a workflow; when the resource fires, the workflow runs with the payload as input.
Use it when a form submission, webhook call, or schedule should start a run.
Works with resources (the three sources) and workflows (the target).
For defining resources, see Resources. For defining workflows, see Workflows.
Syntax
trigger name {
resourceType:resourceName -> workflowName
enabled: true
}Resource types: form, webhook, schedule.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| binding | resourceType:name -> workflow | Yes | The resource-to-workflow 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 workflow must be defined.
- A workflow can have multiple triggers (for example, triggered by both a form and a schedule).
- Trigger names must be unique.