Skip to main content
Version: 0.3.36

Workflow Triggers

Besides starting flows explicitly (API, SDK, admin console Run dialog), flows can start automatically when nodes change. Triggers are raisin:Trigger nodes in the functions workspace that reference a flow through function_flow.

Node-Event Triggers​

A node-event trigger starts the referenced flow whenever a matching node event occurs.

node_type: raisin:Trigger
properties:
name: on-article-published
title: On Article Published
trigger_type: node_event
enabled: true
config:
event_kinds: [Updated] # which events fire the trigger
filters:
workspaces: [content] # glob patterns
node_types: ["my:Article"]
# paths: ["/articles/**"] # optional path globs
# property_filters: # optional conditions on the node's properties
# status: published
# "seo.score": { $gte: 80 }
function_flow:
raisin:ref: /flows/publish-pipeline
raisin:workspace: functions
PropertyDescription
trigger_typenode_event
config.event_kindsAny of Created, Updated, Deleted, Published, Unpublished, Moved, Renamed
filters.workspacesWorkspace glob patterns
filters.pathsPath glob patterns. * matches within one segment, ** matches across segments
filters.node_typesNode type list, for example ["raisin:Page", "raisin:Asset"]
filters.property_filtersObject of property path (dot notation for nested values) to either a literal value or an operator object: $exists, $eq, $ne, $gt, $gte, $lt, $lte, $in
function_flowReference to the raisin:Flow node to start. raisin:ref may be the node's path or id; the server resolves a path to the id on write
enabledDefault true
priorityExecution priority (lower runs first)
max_retriesRetry budget for the trigger's execution job

Trigger nodes live under a folder in the functions workspace, since the workspace root only allows folders. New repositories come with a /triggers folder.

The Flow Input​

When a trigger starts a flow, the flow input describes the event and carries the node:

{
"event": {
"type": "Created",
"node_id": "JyR6mKiKBUV5Om7lhGZDC",
"node_type": "raisin:Page",
"node_path": "/hello"
},
"node": {
"id": "JyR6mKiKBUV5Om7lhGZDC",
"path": "/hello",
"name": "hello",
"node_type": "raisin:Page",
"workspace": "blog",
"properties": { "title": "Hello", "featured": true, "tags": ["a", "b"] },
"created_by": "system",
"created_at": "2026-09-06T18:40:18.849950+00:00"
},
"workspace": "blog"
}

So a step reads the changed node's properties as input.node.properties.*. Trigger metadata is also available under trigger.* (event_type in lower case, node_id, node_type, node_path, workspace, tenant_id, repo_id, branch):

- id: notify
node_type: raisin:FlowStep
properties:
action: Notify the author
function_ref: /lib/notify-author
arguments:
path: "{{ trigger.node_path }}"
event: "{{ trigger.event_type }}"
title: "{{ input.node.properties.title }}"

See Data and Templates.

Triggers That Call a Function​

A trigger can reference a single function through function_path instead of a flow. The function receives the event directly. When a trigger has both, function_flow wins. Use function_flow when you want routing, retries, compensation, or human tasks, even for single-step automations.

Scheduled Triggers​

Schedule-based triggers run on a cron expression. Every minute the server evaluates the enabled schedule triggers of every repository and queues an execution for each match:

node_type: raisin:Trigger
properties:
name: daily-cleanup
title: Daily Cleanup
trigger_type: schedule
enabled: true
config:
cron_expression: "0 2 * * *" # 02:00 UTC every day
function_path: /lib/cleanup-old-data

Supported cron syntax (5 fields: minute, hour, day, month, day-of-week, evaluated in UTC):

PatternMeaning
*Any value
*/15Every 15 units (step values)
1-5Range
1,3,5List
@hourly, @daily / @midnight, @weekly (Monday), @monthly, @yearly / @annuallyPresets

Scheduled triggers invoke a function (function_path). To run a workflow on a schedule, point the trigger at a small function that starts the flow through the flow API, or have the function do the work itself.

Starting Flows Explicitly​

ChannelHow
HTTPPOST /api/flows/{repo}/run with { "flow_path": "/flows/...", "input": {...} }
HTTP (test run)POST /api/flows/{repo}/test with an additional test_config (mocks, isolated branch)
SDKflows.run(path, input), flows.runAndWait(...), flows.runAndCollect(...)
Admin consoleRepository sidebar, Flows, Run dialog (JSON input and live event view)

For an API start, trigger.event_type is manual and the flow input is exactly the input you sent.

Next Steps​