Workflows
A workflow in r8r is a collection of nodes connected by data flow, triggered by events.
Workflow structure
name: "my-workflow" # Required: unique identifierdescription: "Does something" # Optional: human-readabletrigger: # Required: how to start http: path: /api/webhooknodes: # Required: what to execute - name: "step1" type: "http/request" - name: "step2" type: "core/log"Triggers
Every workflow needs a trigger — the event that starts execution:
HTTP trigger
trigger: http: path: /webhook method: POST auth: type: bearerSchedule trigger
trigger: schedule: "0 */6 * * *" # Cron expressionWebhook trigger
trigger: webhook: provider: github secret: "${GITHUB_SECRET}"Execution model
Workflows execute as a directed graph:
- Trigger fires → workflow starts
- Entry nodes execute
- Outputs flow to connected nodes
- Parallel branches run concurrently
- Workflow completes when all terminals finish
State and context
Each execution has a context object:
{{ trigger.body }} # HTTP body{{ trigger.query }} # Query params{{ trigger.headers }} # Headers{{ step1.output }} # Output from node "step1"{{ env.API_KEY }} # Environment variableError handling
Control error behavior per node:
nodes: - name: "risky" type: "http/request" config: url: "https://api.example.com" on_error: continue # continue | stop | retry retry: count: 3 backoff: exponentialConditional execution
Run nodes conditionally:
nodes: - name: "notify" type: "slack/post" if: "{{ fetch.status }} == 200"