Language
Resources
Define forms, webhooks, and schedules as workflow entry points.
Resources are the entry points for your workflows. Each resource type generates a trigger that starts a graph run. Connect resources to graphs using triggers.
Forms
A form defines an input interface with a JSON Schema for its payload. Swirls generates a UI in the Portal and an API endpoint for each form.
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Display name |
description | string | No | Description shown in the Portal |
enabled | boolean | No | Whether the form is active (default true) |
schema | json block | No | JSON Schema for the form payload |
form contact_form {
label: "Contact Form"
description: "Collect contact information"
enabled: true
schema: @json {
{
"type": "object",
"required": ["name", "email", "message"],
"properties": {
"name": { "type": "string", "title": "Name" },
"email": { "type": "string", "title": "Email" },
"message": { "type": "string", "title": "Message" }
},
"additionalProperties": false
}
}
}Webhooks
A webhook defines an HTTP endpoint that accepts external payloads. Webhooks use the same fields as forms.
webhook inbound {
label: "Inbound Webhook"
enabled: true
schema: @json {
{
"type": "object",
"required": ["event", "data"],
"properties": {
"event": { "type": "string" },
"data": { "type": "object" }
},
"additionalProperties": false
}
}
}Schedules
A schedule triggers a graph on a cron expression.
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Display name |
cron | string | Yes | Cron expression |
timezone | string | No | IANA timezone (e.g. "America/New_York") |
enabled | boolean | No | Whether the schedule is active |
schedule daily_report {
label: "Daily Report"
cron: "0 9 * * *"
timezone: "America/New_York"
enabled: true
}Connecting resources to graphs
Resources do not run graphs on their own. You connect a resource to a graph using a trigger. See Triggers for details.