tool_call, transform, wait, or approval.
Lifecycle
A flow moves through these statuses:waiting means the flow has paused — typically on an approval step, or a wait until a
timestamp. You advance it with approve or resume.
List templates
Flows are template-based. Discover the available templates and their keys:Start a flow
POST /api/flows/start
string
required
A template
key from /api/flows/templates.object
default:"{}"
Template inputs. For example,
summarize_unread_gmail accepts optional query (a Gmail
search, default is:unread), maxResults (1–20), and gmailConnectionId.
gmail_to_notion_task_sync additionally requires notionParent.string
default:"manual"
One of
agent, manual, webhook, schedule. Records how the flow was started.flowId, the full flow (record + steps), and the
templates list:
Get a flow
GET /api/flows/{id} returns the current { flow, steps }. Poll it to watch progress.
stepKey, stepIndex, stepType, status, input, output,
error, attemptCount, and timestamps — so you can see exactly where a flow is and what
each step produced.
List your flows
GET /api/flows?limit=30 (max 100) returns { flows: [...] }, most recent first.
Approve a step
When a flow iswaiting on an approval step (e.g. gmail_to_notion_task_sync pauses
before creating Notion pages), approve it to continue:
POST /api/flows/{id}/approve
string
The approval step to approve. Optional — omit to approve the current waiting step.
{ flow, steps }.
Resume
POST /api/flows/{id}/resume re-drives a flow that is waiting (e.g. its wait
timestamp has passed) or retries one that failed. Returns the updated { flow, steps }.
Cancel
POST /api/flows/{id}/cancel stops a flow and sets its status to cancelled. Returns the
updated { flow, steps }.
404 {"error":"Flow not found"} for an unknown id or a flow
that belongs to another account.