n8n_test_workflow
Execute n8n workflows automatically via webhook, form, or chat triggers, or run them directly through n8n's MCP server with pinned data and custom inputs.
Instructions
Run a workflow. method=auto (default) triggers it over HTTP through its webhook/form/chat trigger. Workflows without such a trigger need n8n's MCP server: method=prepare lists the nodes that need pinned data, method=pinned runs the workflow with that data, method=direct starts a run with optional inputs. The official methods need N8N_MCP_ACCESS_TOKEN and the workflow's "Available in MCP" setting (exposeToMcp: true enables it after you confirm with the user).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Input data/payload for webhook, form fields, or execution data | |
| method | No | How to run it. auto (default): trigger over HTTP when the workflow has a webhook/form/chat trigger, otherwise report that it cannot be triggered - auto never runs through n8n's MCP server. trigger: force the HTTP path. prepare: list the nodes needing pinned data (read-only). pinned: run with pinData through n8n's MCP server. direct: start a run through n8n's MCP server, with optional inputs. | |
| headers | No | Custom HTTP headers | |
| message | No | For chat: message to send (required for chat triggers) | |
| pinData | No | For method=pinned (required, non-empty): pinned trigger data keyed by node name. Each value is an array of ITEMS, and every item must be wrapped as { "json": { ... } } - e.g. {"Webhook": [{"json": {"id": "123"}}]}, never a flat object. Get the node list from method=prepare. | |
| timeout | No | Timeout in ms (default: 120000). HTTP trigger path only (method auto/trigger) — the official methods (prepare/pinned/direct) use timeoutMs instead. | |
| sessionId | No | For chat: session ID for conversation continuity | |
| timeoutMs | No | Client-side deadline for the official call (default: 30000 for prepare, 300000 for pinned/direct) | |
| httpMethod | No | For webhook: HTTP method (default: from workflow config or POST) | |
| workflowId | Yes | Workflow ID to execute (required) | |
| exposeToMcp | No | For the official methods: enable the workflow's persistent "Available in MCP" setting when n8n refuses the call. Confirm with the user first. | |
| triggerType | No | Trigger type. Auto-detected if not specified. Workflow must have a matching trigger node. | |
| webhookPath | No | For webhook: override the webhook path | |
| executionMode | No | For method=direct: manual (default) runs it as a manual execution; production runs it through the production execution path. Both execute the workflow's nodes for real - this only changes the execution context. Never chosen implicitly. | |
| triggerNodeName | No | For method=pinned/direct: which trigger node to start from. Defaults to the detected trigger node. Required by n8n when inputs are given. | |
| waitForResponse | No | Wait for workflow completion (default: true) |