Skip to main content
Glama

n8n_update_workflow

Modify existing n8n workflows by updating nodes, connections, settings, or renaming them through the Cursor IDE integration.

Instructions

Update an existing workflow. You can update name, nodes, connections, or settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to update
nameNoNew name for the workflow
nodesNoUpdated array of nodes (replaces all existing nodes)
connectionsNoUpdated connections object (replaces all existing connections)
settingsNoUpdated workflow settings

Implementation Reference

  • The handler function that implements the core logic of the n8n_update_workflow tool. It validates input, constructs update data, calls the N8nApiClient to update the workflow, and returns a success response.
    n8n_update_workflow: async ( client: N8nApiClient, args: Record<string, unknown> ): Promise<ToolResult> => { const id = args.id as string; if (!id) { throw new Error('Workflow ID is required'); } const updateData: Parameters<typeof client.updateWorkflow>[1] = {}; if (args.name !== undefined) updateData.name = args.name as string; if (args.nodes !== undefined) updateData.nodes = args.nodes as N8nNode[]; if (args.connections !== undefined) updateData.connections = args.connections as N8nConnections; if (args.settings !== undefined) updateData.settings = args.settings as N8nWorkflowSettings; const workflow = await client.updateWorkflow(id, updateData); return { content: [ { type: 'text' as const, text: JSON.stringify({ success: true, message: `Workflow "${workflow.name}" updated successfully`, workflow: { id: workflow.id, name: workflow.name, active: workflow.active, nodeCount: workflow.nodes.length, updatedAt: workflow.updatedAt, }, }, null, 2), }, ], }; },
  • The tool definition and registration entry in the workflowTools array, including the name, description, and detailed input schema for validation.
    { name: 'n8n_update_workflow', description: 'Update an existing workflow. You can update name, nodes, connections, or settings.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The workflow ID to update', }, name: { type: 'string', description: 'New name for the workflow', }, nodes: { type: 'array', description: 'Updated array of nodes (replaces all existing nodes)', }, connections: { type: 'object', description: 'Updated connections object (replaces all existing connections)', }, settings: { type: 'object', description: 'Updated workflow settings', }, }, required: ['id'], }, },
  • The input schema definition for the n8n_update_workflow tool, specifying parameters and validation rules.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The workflow ID to update', }, name: { type: 'string', description: 'New name for the workflow', }, nodes: { type: 'array', description: 'Updated array of nodes (replaces all existing nodes)', }, connections: { type: 'object', description: 'Updated connections object (replaces all existing connections)', }, settings: { type: 'object', description: 'Updated workflow settings', }, }, required: ['id'],

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alicankiraz1/cursor-n8n-builder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server