Import from Studio
Enterprise module
Flows is part of the Enterprise edition. Importing from Studio needs Flows admin access in the project. See Flows.
The flow importer turns Cognipeer Studio flows (and, optionally, their run history) into Console flows. It runs from the dashboard or from a command line script.
Point external steps at test targets before the first run
An imported flow keeps what it did in Studio. Steps can send email (SMTP), read and write mailboxes through Microsoft 365, call HTTP endpoints, fetch web pages or run code that reaches other systems, using the credentials that came with the file. Do not run an imported flow until you have checked every step that reaches outside Console and, for the first runs, pointed those steps at a test mailbox, a test endpoint or a test server. A test run from the editor, an API call or an agent is a real run.
Import in the dashboard
- Open Agents → your agent → Flows and choose Import.
- Choose a JSON file. The kind is recognized when you pick it: Console flow, Studio export bundle, Studio flow or Studio flows.
- For a Studio file, choose Check the file. This is a dry run: it shows, flow by flow, what will be created, what is Already imported and what Cannot import, with notes such as Not supported: …. Nothing is written.
- Set the options (below) and choose Import.
What the importer recognizes
You do not say what kind of file it is. The importer accepts:
- a Studio export bundle (
cognipeer.studio-export); - the file saved with Studio's Export button (one flow or a list of them);
- a raw Studio app document;
- a bare definition (an object with
steps); - a list of any of these.
A Console export (cognipeer.flow) is recognized as such and imported as a Console flow.
Options
| Option | Meaning |
|---|---|
| Bring the secrets to Config | Secrets of the Studio flow projects become secret Config items of this project. On by default. You need Config write access in the project; without it, no item is written but the steps still point at the Config items, and a Config administrator can create them. |
| Import run history | Brings the Studio runs along as read-only history (trigger Import). |
What is mapped
Secrets go to Config
Studio keeps secrets on the flow project and flows read them as {{secrets.KEY}}. Console keeps secrets out of step expressions: a step names a Config item and reads it when it runs.
- Each Studio flow project gets one Config group (its key starts with
studio-); tool credentials go to a group named Studio: tools. - The item keeps the Studio key when it is free. Values are stored encrypted at rest and never appear in reports or warnings.
- Steps point at the items: bearer and header authentication on HTTP steps, and the secret variables of sandbox steps. A
Basic …header is built into a derived item. - A re-import never overwrites an item that already exists.
- Sandbox secrets go to the sandbox command's secret variables, not to sandbox creation. A
{{secrets.X}}pasted into a shell command becomes an environment variable.
Steps
| In Studio | In Console |
|---|---|
| AI steps | LLM (images become data-URL content parts); {{input.X}} is read as the run input |
| Execute NodeJS | Run code (code.run). The code is unchanged, wrapped so it gets the same context and module.exports; output.response is read as output.result; a returned _context sets flow variables |
| Agent that used tools | AI Agent step with its own agent, keeping model, instructions, structured output, tool-call limit and planning mode. Web search becomes web_search; the web page tool becomes Web Fetch when you pass a crawler; a sandbox becomes the agent's own session sandbox. Other tools are listed in the step's warnings |
| Microsoft 365 Email (read, send, mark as read, delete, search) | Run code with a Microsoft Graph script. The client secret is a secret variable; GRAPH_BASE_URL and LOGIN_BASE_URL can point at a test server |
| Web page | Scrape web page |
| DuckDuckGo search | Web search |
| SMTP sender | Send email, with its password in a Config item |
Analytics track-event | The event is kept in the step output, so the flow does not stop on it |
| Any other tool step | Unsupported Studio step (legacy.unsupported). The report names the tool and the action |
A Studio final step inside a loop ends that iteration, not the whole run.
A flow with legacy.unsupported steps imports, but it cannot be published and it fails when a run reaches such a step. The step keeps the original Studio type and settings so you can rebuild it. Read the report, replace each one with Console steps (a connector action, an HTTP request) and run Validate before you publish.
Publishing
A flow is published as it was in Studio by default (as_in_studio). With the script, --publish never imports everything as drafts.
Import from the command line
The script scripts/flows/import-studio.ts in the Enterprise package reads a bundle file or a Studio workspace database (read-only) and writes into a project's Console database. Re-running is safe: flows and runs already imported (matched by Studio id) are skipped. Studio itself is only read.
# dry run: map and report, write nothing
node --import tsx scripts/flows/import-studio.ts \
--file studio.json --tenant <slug|dbName> --project <projectId> --dry-run
# import from a Studio workspace database
node --import tsx scripts/flows/import-studio.ts \
--mongo-uri <uri> --mongo-db <db_name> --tenant <slug|dbName> --project <projectId>| Option | Meaning |
|---|---|
--file <bundle.json> | A Studio bundle file. Use either this or --mongo-uri with --mongo-db. |
--tenant, --project, --user | The target. --tenant and --project are required. |
--dry-run | Map and report, write nothing. |
--no-runs | Skip run history. |
--publish <mode> | as_in_studio (default) or never. |
--agent <key> | Attach every imported flow to this agent key. |
--model-map <file> | A JSON object that maps Studio model ids to Console model keys. |
--default-model <key> | The Console model for Studio models the map does not cover. |
--workspace <name> | Recorded on the imported rows. |
--report <file> | Also write the JSON report to this file. |
--no-validate | Skip the node-catalog validation summary. |
--no-secrets | Do not create Config items for the flow-project secrets and tool credentials. |
--crawler <key> | The Console crawler that imported agents fetch web pages with (Studio's web page tool). |
--web-search <key> | The Console Web Search instance for web searches. Default: the project's single active one. |
The dashboard import does not take --crawler or --web-search; use the script for those.
Before you run an imported flow
- Read the report: every Not supported step and every warning on an AI Agent step.
- Open each flow, run Validate, and fix what it lists. Pick Console models where the model map had no match.
- Check every step that reaches outside Console: Send email, HTTP request, Scrape web page, the Microsoft 365 Run code steps, and any Run code or sandbox step.
- Point those steps at test targets: a test mailbox or SMTP sink, a test endpoint,
GRAPH_BASE_URLandLOGIN_BASE_URLat a mock server. Replace the Config items' values if they hold real production credentials you do not want a test run to use. - Run the flow with the Test panel and follow it under Flow runs.
- Only then switch the steps to the real targets and publish.

