Skip to main content
Glama

n8n_activate_workflow

Activate an n8n workflow to enable automated task execution by making it ready for triggering through its configured nodes.

Instructions

Activate a workflow so it can be triggered. The workflow must have a valid trigger node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to activate

Implementation Reference

  • The handler function that executes the tool logic: validates the workflow ID, calls client.activateWorkflow(id), and returns a formatted success response with workflow details.
    n8n_activate_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 workflow = await client.activateWorkflow(id); return { content: [ { type: 'text' as const, text: JSON.stringify({ success: true, message: `Workflow "${workflow.name}" activated successfully`, workflow: { id: workflow.id, name: workflow.name, active: workflow.active, }, }, null, 2), }, ], }; },
  • The ToolDefinition object specifying the tool's name, description, and inputSchema (requiring a string 'id'). This is part of the workflowTools array used for tool listing.
    { name: 'n8n_activate_workflow', description: 'Activate a workflow so it can be triggered. The workflow must have a valid trigger node.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The workflow ID to activate', }, }, required: ['id'], }, },
  • src/server.ts:122-125 (registration)
    Runtime dispatch/registration logic in the MCP server's handleToolCall method that checks if the tool name exists in workflowToolHandlers and invokes the corresponding handler with the N8nApiClient and arguments.
    if (name in workflowToolHandlers) { const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers]; return handler(client, args); }

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