# import_workflow

Import a complete workflow graph as a new private workflow, optionally into a project.

Saves a definition only: importing runs none of the graph's steps and spends no Creative  
Units. The graph may only use the node kinds get\_blueprint\_system\_config lists, all of them  
Layer operations; running the workflow later is a separate execute\_workflow call.

Use this to bring in a workflow authored outside the Blueprint editor, such as one  
converted from another workflow tool, in one call. Call get\_blueprint\_system\_config  
first for the node kinds, ports and value schemas the graph must use, then call with  
\`validate\_only=true\` and fix the reported problems until \`is\_valid\` is true.

The workflow is always created private and unfeatured; making it public or featured is  
a separate curation step in the app. By default the version is published so the  
workflow can run right away with execute\_workflow; an invalid graph is then rejected and  
nothing is created. With \`publish=false\` a draft is created even when the graph has  
problems.  

## Parameters

| Parameter             | Type            | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------- | --------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| workspace\_idrequired | string (uuid)   | —       | The workspace that will own the imported workflow.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| project\_id           | string (uuid)   | —       | Optional project to add the workflow to, e.g. a curation project. Use list\_projects to find project ids.                                                                                                                                                                                                                                                                                                                                                                                 |
| namerequired          | string1–∞ chars | —       | Display name for the workflow.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| description           | string          | —       | Optional description shown with the workflow.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| graphrequired         | object          | —       | The complete blueprint graph: \`inputs\` (parameter key to input parameter), \`outputs\` (parameter key to output parameter), and \`nodes\` (node id to node). Nodes use kinds and ports from get\_blueprint\_system\_config. Edges are not listed separately: a node input or output parameter names what feeds it in its \`refs\` (\`{"\_default": \[...\]}\`), either a node output (\`nodes::<node id>\[<kind key>\]::<port key>\`) or a workflow input (\`blueprint::<input key>\`). |
| publish               | boolean         | true    | Publish the imported version so the workflow can run (it stays private). Requires a valid graph. Set false to keep it as a draft, which is created even when the graph has problems so it can be fixed in the editor.                                                                                                                                                                                                                                                                     |
| validate\_only        | boolean         | false   | Only check the graph and report problems; create nothing. Use it to iterate on a converted graph before importing it.                                                                                                                                                                                                                                                                                                                                                                     |
