--- title: "Import workflow from Agent Spec JSON" description: "Convert an Agent Spec flow or document to a FlowDrop workflow.\n\nThe conversion:\n- Maps Agent Spec component types to FlowDrop node types\n- Merges control_flow_connections and data_flow_connections into unified edges\n- Auto-layouts nodes if no position metadata is present\n- Preserves Agent Spec component_type in FlowDrop extensions\n\nThis is the Agent Spec counterpart of the FlowDrop-native\n`POST /workflows/import` under **Import and Export**.\n" source: https://flowdrop.io/docs/api/agent-spec/importWorkflowFromAgentSpec site: FlowDrop documentation --- # Import workflow from Agent Spec JSON `POST /workflows/import/agentspec` Convert an Agent Spec flow or document to a FlowDrop workflow. The conversion: - Maps Agent Spec component types to FlowDrop node types - Merges control_flow_connections and data_flow_connections into unified edges - Auto-layouts nodes if no position metadata is present - Preserves Agent Spec component_type in FlowDrop extensions This is the Agent Spec counterpart of the FlowDrop-native `POST /workflows/import` under **Import and Export**. ## Request body - `application/json` — object ## Responses - `200` — Workflow imported successfully (`application/json`: WorkflowResponse) - `400` — Bad request - invalid parameters or request body (`application/json`: ErrorResponse) - `422` — Invalid Agent Spec format (`application/json`: AgentSpecValidationResult) - `500` — Internal server error (`application/json`: ErrorResponse) *Tags: Agent Spec*