Flow Code and versions
Every flow has a Code that identifies it everywhere – in other companies, other environments and the template gallery – and every change you publish is kept as a numbered version. This page explains how both work and where you see them.
The flow Code
A flow needs a Code before you can publish (activate) it or publish it to the template gallery. You choose it yourself on the flow card.
- Use your own namespace in front, separated by a dot, for example
YOURCOMPANY.INVOICE-APPROVAL. That keeps your Codes apart from those in templates of other publishers. - Allowed are the letters A–Z, digits,
_and-, with at most one.between namespace and Code. The Code can be up to 60 characters long. - Each Code can only be used by one flow in a company.
Flows that already existed before Codes became mandatory keep running. The next time you publish one of them or publish it to the gallery, AutoFlow reminds you that it needs a Code – enter one on the flow card and try again.
When you can change the Code
You can change the Code at any time while the flow is not linked to a gallery template, and while it is linked to one of your own templates that is still private. The Code is locked:
- once your template is public, and
- for flows created from someone else's template.
To change it anyway, use Disconnect from template on the flow card – after that the Code is editable again. Keep in mind that other flows calling this one as a SubFlow, and templates that contain it, refer to it by its Code.
Version numbers
Each version of a flow has a number in the form major.minor.patch, for example 1.2.4. The numbers are the same locally and in the template gallery, so 1.2.0 means the same flow everywhere.
- A new flow starts as draft 0.0.1.
- Clicking Edit flow on a published flow creates a new draft with the next patch number: with 0.0.3 active, the draft becomes 0.0.4.
- Publishing keeps the number – draft 0.0.4 becomes active version 0.0.4.
- Minor and major numbers only go up when you publish the flow to the template gallery or install a template version (see Publishing flows as templates).
Where you see them
- The flow card shows the Active Version (the version that runs) and, while you are working on a draft, the Draft Version.
- The Flow Workspace shows the active version next to each flow in the list (for example
v1.2.3) and in the preview of the selected flow. - The AutoFlow Flows (Legacy) list shows the Active Version of every flow.
- View all versions on the flow card opens the Flow Versions list, newest first, with these columns:
| Column | What it shows |
|---|---|
| Version | The version number. Versions from before version numbers were introduced show –. |
| State | Active – the version that runs. Draft – the version you are editing. Template reference – the gallery version your flow is based on (see below). Older versions have no state. |
| Created From | The version this one was created from. |
| Created At | When the version was created. |
Going back to an older version
Open an older version from the Flow Versions list and click Create Draft. The draft gets the next number in the flow's current line, not in the old one: with 1.2.4 active, a draft created from 0.0.2 becomes 1.2.5. Publish it to make it the running version again.
Template references
When a flow comes from the template gallery, AutoFlow keeps the template version you installed as a separate version with the state Template reference (for example 1.3.0). It is the base AutoFlow uses to combine your own changes with the next template update – see Creating flows from templates.
A template reference is read-only: you can't publish it, you can't edit its SmartFields and you can't delete it while the flow uses it. To work with it, click Create Draft on it.
Exporting and importing flows
Export current version on the flow card (or Export on any version in the Flow Versions list) downloads the flow as a file. The file carries the flow's Code and version, and its name follows the pattern AutoFlow_<Code>_<version>.json, for example AutoFlow_YOURCOMPANY.INVOICE-APPROVAL_1.2.0.json.
To import it, use Create from file on the AutoFlow Flows (Legacy) list.
- If no flow in this company uses the file's Code, a new flow is created.
- If a flow with that Code already exists, AutoFlow doesn't create a second one. It asks whether to import the file as a new draft version of that flow instead. The draft gets the next version number of that flow, and Created From in the Flow Versions list shows the version stored in the file. If the file contains an older version than the flow already has, the question warns you about it – answer No if you picked the wrong file.
- If that flow already has an open draft, AutoFlow mentions it. The new draft takes its place, and the previous draft stays in the version history.
As with every draft, the active version keeps running until you publish the imported one.