Get n8n Workflow
n8n_get_workflowRetrieve complete workflow details including nodes, connections, and settings by providing the workflow ID. Use this tool to inspect workflow configurations and understand automation structures.
Instructions
Get full details of a specific workflow including all nodes and connections.
Args:
id (string): The workflow ID
Returns: Complete workflow object with:
name, id, active status
nodes array with all node configurations
connections mapping
settings
tags
timestamps
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique identifier of the resource |
Implementation Reference
- src/tools/workflows.ts:119-130 (handler)The handler function for 'n8n_get_workflow' retrieves a workflow by ID and formats it for output.
async (params: z.infer<typeof IdParamSchema>) => { const workflow = await get<N8nWorkflow>(`/workflows/${params.id}`); const nodeList = workflow.nodes.map(n => ` - ${n.name} (${n.type})`).join('\n'); const text = `${formatWorkflow(workflow)}\n\n**Nodes (${workflow.nodes.length}):**\n${nodeList}`; return { content: [{ type: 'text', text }], structuredContent: workflow }; } ); - src/tools/workflows.ts:94-118 (registration)Tool registration for 'n8n_get_workflow'.
server.registerTool( 'n8n_get_workflow', { title: 'Get n8n Workflow', description: `Get full details of a specific workflow including all nodes and connections. Args: - id (string): The workflow ID Returns: Complete workflow object with: - name, id, active status - nodes array with all node configurations - connections mapping - settings - tags - timestamps`, inputSchema: IdParamSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } },