Create a flow (saved as a draft)
create_flowCreates a flow (an automation) as the Automations page's New flow does: a name, an optional description, how it classifies an incoming message (trigger_rules: categories, keywords or senders; trigger_direction inbound unless it starts on an outgoing message), and its steps in order, at least one. It is born a DRAFT: it runs nothing until a person turns it on (set_flow_on), and nothing is sent. Each step takes a title and instructions; a step that reaches the client names its channel (sms or email) and message_template, written with Sergio's merge tags, never a hard-coded business or client name; timing is the owner's words in when_phrase. read('flows') returns the company's existing templates to copy from. Pass the same idempotency_key when retrying; a repeat returns the same flow.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"steps": "<steps>",
"idempotency_key": "<idempotency_key>"
},
"name": "create_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | ||
| name | Yes | ||
| color | No | ||
| steps | Yes | ||
| summary | No | One line on what the flow is for, shown beside its name. | |
| description | No | ||
| trigger_rules | No | ||
| idempotency_key | Yes | Your id for this operation (8-128 of A-Z a-z 0-9 . _ : -). Reuse it on every retry of the same operation; use a new one for a new operation. | |
| trigger_direction | No | inbound (default) starts it on a message the client sends; outbound on one we send. |