export_workflow_json
Export a ComfyUI workflow as JSON in UI or API format, optionally writing it to a file path for sharing or POST /prompt automation.
Instructions
The workflow as JSON: 'ui' (shareable, opens in the editor, keeps layout & notes) or 'api' (for POST /prompt automation).
Pass path to also write the JSON to a file; the dict then reports saved_to instead of embedding the graph.
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": {
"workflow_id": "<workflow_id>"
},
"name": "export_workflow_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| format | No | ui | |
| workflow_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||