Pipeline
Use flowbot pipeline for platform pipeline definitions stored in the database.
YAML is an exchange format for apply / export only — the server runs published definitions from PostgreSQL (not local files).
Prefer the workflows below; load references/schema.md for the full YAML definition,
references/cli.md for flags,
references/steps.md for step fields, templates, and retry, and
references/capabilities.md (index) and references/capabilities/<type>.md for every capability operation param list.
Never invent a capability type that is absent from the capabilities index.
Teaching examples (load via read_skill with path):
Setup
- Ensure CLI auth:
flowbot login - Set server via
FLOWBOT_SERVER_URLor--server-url; optional--profile,--debug/-d - Token scopes:
pipeline:readfor list/get/export/runs;pipeline:runfor apply/delete/run (run also satisfies read) - Prefer
-o jsonwhen parsing results programmatically
Step shape
Each step uses capability + operation fields (not workflow action: capability:<type>.<op>).
Load references/steps.md for templates and retry.
Load references/schema.md before writing any pipeline YAML.
Load references/capabilities.md for the capability index; must open references/capabilities/<type>.md before emitting that type's operations.
Templates
Step params use Go text/template delimiters {{ }} (same engine as workflows).
Variables available in pipelines:
| Variable | Access | Source |
|---|---|---|
| Event payload | {{event "url"}} / {{.Event.url}} |
DataEvent / pipeline run --event |
| Prior steps | {{step "name" "field"}} / {{.Steps.name.field}} |
Completed step outputs |
| Env | {{.Env.HOME}} |
Runner environment (when populated) |
Not set for pipelines: workflow-style input / .Input (use event instead).
Helpers (closed set): event, step, input, jsonpath, jsonpathExists, jsonpathRaw, default, json, len, join, split, contains, now, plus Go builtins if/else/range/eq/printf.
Full list: references/steps.md.
Never invent a helper absent from that list.
Workflows
Write or edit a pipeline YAML
When the user needs a new or updated pipeline definition:
- Load references/schema.md and copy the skeleton (name, enabled, triggers, steps).
- For each step, open references/capabilities/.md first; never invent types missing from the capabilities index.
- Use only documented template helpers from references/steps.md; prefer event/step over workflow input.
- Use examples/event_notify.yaml or examples/cron_cleanup.yaml as starting points.
flowbot pipeline apply --file path/to/pipeline.yamlflowbot pipeline get <name>- Optional: flowbot pipeline run --event '{...}' then flowbot pipeline runs .
Apply a definition from YAML
When the user already has a pipeline YAML file to create or replace (publishes immediately):
- Validate against references/schema.md: name, triggers, steps, and event/step templates. Reject files with kind: pipeline_blueprint.
flowbot pipeline apply --file path/to/pipeline.yamlflowbot pipeline get <name>
Instantiate a pipeline blueprint
When the user wants a parameterized official or imported template instead of writing YAML:
flowbot blueprint list- If required capabilities are missing, instantiate is disabled until those apps are connected in Hub.
flowbot blueprint instantiate builtin webhook_notify --name my_webhook --inputs '{"webhook_path":"hooks/notify","notify_channel":["default"],"template_id":"demo.new_item"}'flowbot pipeline get my_webhook
List and inspect
When the user asks what published pipelines exist:
flowbot pipeline listflowbot pipeline get <name>- Optional: flowbot pipeline export -o file.yaml to round-trip published YAML.
Run a pipeline
When the user wants to execute a published pipeline manually:
- Build optional event JSON for {{event.*}} keys (cron-only may use {}).
flowbot pipeline run <name> --event '{"url":"...","title":"..."}'- Note the returned run_id (runs are asynchronous).
flowbot pipeline runs <name>
Delete
When the user wants to remove a definition (run history is deleted, including compound trigger runs):
flowbot pipeline delete <name>
Troubleshooting
| Error | Fix |
|---|---|
| not logged in | flowbot login |
| server URL is required | set FLOWBOT_SERVER_URL or pass --server-url |
| insufficient scope | token needs pipeline:read and/or pipeline:run |
| pipeline name is required / not found | apply first; check list; draft-only pipelines are invisible to CLI |
| conflict / 409 | someone else changed the draft; re-export/edit and apply again |
| pipeline is disabled | set enabled: true in YAML and re-apply |
| apply rejected as pipeline_blueprint | use flowbot blueprint instantiate; do not pass wrapper YAML to pipeline apply |
function "…" not defined |
replace with a helper from references/steps.md |