Publish a flow, compare its versions and roll back

What a request runs, how a draft becomes a published version, how two versions are compared and how a flow goes back to an earlier one.

4 min read

A flow is edited as a draft and runs as a published version. A publish turns the draft into the next numbered version and makes requests run it. A rollback makes an earlier version run again. A published version never changes, so every version stays as it was published.

What a request runs

  • A version is either a draft or published. A flow has at most one draft, and requests never run it.

  • Requests run the active version: the last one published, or the one a rollback went back to. The Versions tab of a flow gives it the status Active.

  • The draft starts from the active version. Editing a published flow edits a copy of what runs, and requests go on running the active version until the next publish.

  • An execution keeps the version it started on. A publish or a rollback changes what the next request runs, not one that is running or waiting.

Publish the draft

1. Check the draft

Open the flow in the builder and press Validate. The check lists errors and warnings. An error is something a version may not be published with — How a flow is built lists what every flow must have. A warning does not stop a publish.

2. Publish it

Press Publish. The draft is checked again, and an error stops the publish with nothing changed. Without errors the draft becomes the next published version and the active one at once.

  • A publish makes an archived flow active again.

  • A draft that holds Http Request is not published: the node is frozen unless the service is set up otherwise, and a new version may not have it. A version published with it before goes on running, and a rollback can return to such a version.

  • Publishing and rolling back need the flows:write permission — Organizations, projects and roles says which roles have it.

  • Slen sends the flow.published webhook event after a publish.

Over the API a publish is POST /v1/flows/{id}/publish. An error in the draft refuses it with 422 and the code flow_invalid, and error.details.issues lists what was found. A flow with no draft is answered 404 with the code flow_draft_not_found: there is nothing new to publish. A publish that meets a save of the draft made while it was being prepared — or another publish of the same draft — is answered 409 with the code draft_conflict, and nothing is published.

See the versions

Open the flow, then its Versions tab. Version history, on the left, lists every version of the flow, the newest first: its number, its status, when it was published — Not published for the draft — and who published it. The author is the person who published the version, an API key, or Deleted account when that account is gone. The active version carries the status Active.

Press a version to pick it. The picked version is framed, and the comparison on the right shows it against the active version; the active version itself is shown against the one before it.

Compare two versions

Compare versions reads two versions as spending policies. Pick one version in Before and the other in After; the older one is the before whichever way round they are picked. The tab opens on the active version compared with the version before it.

Changes lists what changed between the two, node by node. Each node is marked added, removed or changed, and a table under it shows every setting that moved: its name as the node's settings call it, the technical key under it, the value before and the value after. A branch that leads elsewhere is listed under Branches. Settings that do not decide what a call may cost — the temperature, the node's name and the like — wait under Technical changes, closed unless nothing else changed. A node moved on the canvas is not a change.

Roll back

1. Pick the version

On the Versions tab, press the version in Version history, then the rollback button under the list. The button is there for a published version that is not active.

2. Confirm

Press Roll back. The version becomes the active one.

  • The references of the version are checked first. A model or a provider pool that is gone since stops the rollback, and the API answers 422 with the code flow_invalid.

  • A rollback publishes nothing new. The version keeps its number and its author.

  • The draft is left as it is. When the flow has no draft, the next edit starts from the version the flow went back to.

  • An archived flow stays archived.

  • Slen sends the flow.rolled_back webhook event.

Over the API a rollback is POST /v1/flows/{id}/rollback. With version_number it goes to that version; a draft is refused with 409 and the code flow_version_not_published. Without it the flow goes to the published version just below the active one, so repeated calls walk back through the history. At the first version the answer is 409 with the code no_previous_version.

Where to go next

  • AI flows — how a request finds its flow, and the states of a flow.

  • How a flow is built — what a version holds: the nodes and their ports.

  • Glossary — version, draft and active version in one place.

  • Flow builder — where the draft is edited before a publish.