Prepare Flow publication
prepare_publish_flowValidates the saved Flow draft and prepares publication without changing its published version. Requires flows.read and explicitly enabled flows.publish. First read get_flow_details plus get_flow_definition for draft and, if available, published; explain changed trigger, sender, emails, pauses, branches and linked Flows to the user. Resolve unclear intent before preparing. Pass the current revision and an explicit enrollmentMode: future_only leaves existing matching contacts out; include_existing enrolls eligible existing contacts and is supported only for already active form_submitted/tag_added Flows. Ask the user which mode they want; never silently select include_existing. Show the summary, warnings, reference diagnostics, next version, current active state and enrollment counts, then obtain explicit approval before commit_publish_flow. Publication affects new entries immediately on an active Flow; existing runs keep their version. An inactive Flow stays inactive and must be activated in the Admin UI. Publish is separate from draft saves and Flow Email edits, which can already be live for referenced emails.
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": {
"flowId": "<flowId>",
"expectedRevision": "<expectedRevision>",
"idempotencyKey": "<idempotencyKey>",
"enrollmentMode": "<enrollmentMode>"
},
"name": "prepare_publish_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | Flow ID to publish | |
| enrollmentMode | Yes | Explicit user choice: future entries only or also eligible existing contacts on an active form/tag Flow | |
| idempotencyKey | Yes | Unique operation key; generate once for preparation and reuse unchanged for commit and retries. Use a new key after preparing a changed operation. | |
| expectedRevision | Yes | Exact current revision read after draft edits |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | ||
| expiresAt | Yes | ||
| requestId | Yes | ||
| confirmationToken | Yes |