Skip to content

The build loop

Every n8n workflow built through this kit follows the same 8-step loop. Subagents enforce it; you should know what they're doing.

Why a fixed loop?

Hand-written n8n workflows from memory fail constantly — property names drift between node versions, validation rules are subtle, and nodeType formats differ by tool. The loop eliminates guesswork by pulling real schemas from the n8n-mcp server and validating at every step.

The 8 steps

  1. Invoke the matching skill — before any tool call, load the skill that encodes the relevant patterns. Skipping this is the single biggest cause of broken workflows.
  2. Discover nodessearch_nodes({query})get_node({nodeType, detail: "standard"}).
  3. Pull real schemas — never hand-write configs from memory. get_node returns the canonical property list for the installed node version.
  4. Validate each nodevalidate_node({nodeType, config, profile: "runtime"}). Fix errors one node at a time before assembling the workflow.
  5. Create the workflown8n_create_workflow({name, nodes, connections}). Use the full prefix (n8n-nodes-base.slack) for the type field here.
  6. Validate the whole workflown8n_validate_workflow({id}). Catches connection errors, branch mismatches, and cross-node issues.
  7. Iteraten8n_update_partial_workflow({id, intent, operations}). Always pass intent (why you're making this change) — it's not cosmetic.
  8. Activaten8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]}).

The nodeType format gotcha

n8n-mcp has two tool categories that use different prefixes for the same node:

ToolPrefixExample
search_nodes, get_node, validate_node, validate_workflowshortnodes-base.slack
n8n_create_workflow, n8n_update_partial_workflowfulln8n-nodes-base.slack

search_nodes returns both in its results — use nodeType for search/validate, workflowNodeType for workflow tools.

LangChain nodes follow the same pattern: nodes-langchain.agent vs @n8n/n8n-nodes-langchain.agent.

Validation profiles

Four options, from lenient to strict:

  • minimal — only checks required fields. Use when debugging connection structure.
  • runtime — checks values and types. Default and recommended.
  • ai-friendly — reduces false positives from AI-generated configs.
  • strict — maximum safety, use before production hand-off.

Smart parameters

When connecting IF or Switch nodes, use semantic names instead of sourceIndex:

javascript
// IF node
{ type: "addConnection", source: "IF", target: "Handler", branch: "true" }

// Switch node
{ type: "addConnection", source: "Switch", target: "Case A", case: 0 }

When a template already exists

Before step 2, search the 2,700+ community templates:

javascript
search_templates({ query: "your use case" })

If a template fits, n8n_deploy_template drops it into your instance — skips steps 3-6 entirely.

MIT Licensed