Back to home

I Broke n8n (So You Don't Have To)

March 2026

The Error That Wouldn't Go Away

I'm building AI-powered automation systems with n8n and Claude Code. The workflow: design the logic, have Claude generate the n8n workflow JSON, import it into my Railway-hosted n8n instance, and deploy. Simple, right?

Except every single workflow Claude generated failed on import with the same cryptic error:

"Problem importing workflow: Could not find property option"

The canvas would go blank. No nodes. Just "Add first step..." mocking me. The workflow JSON looked perfectly valid — proper structure, correct node types, reasonable parameters. But n8n rejected it every time.

This wasn't a one-off glitch. It happened consistently across multiple workflows, multiple browsers, and multiple attempts. I spent hours chasing ghosts before finding the real culprit.

What I Tried First (All Wrong)

Theory 1: "It's Railway"

My n8n runs on Railway with a Primary + Worker + Postgres + Redis architecture in queue mode. I checked the services, verified shared encryption keys, confirmed Postgres connectivity. Everything was solid. Manually created workflows worked fine — the infrastructure was not the problem.

Theory 2: "It's the browser cache"

Tried incognito mode. Same error. Tried a different browser. Same error. Cleared everything. Same error.

Theory 3: "It's the database"

Checked Postgres logs, verified the n8n schema was intact, confirmed read/write permissions. The database was fine — it was happily storing the workflows I created manually through the UI.

None of these were the issue. The problem was in the JSON itself — specifically, in the parameter schemas that Claude Code was generating.

The Real Problem: Schema Mismatch

n8n's internal node parameter schemas are strict and version-specific. They're not publicly documented in a way that AI models can learn from. So when Claude (or any AI) generates n8n workflow JSON, it produces something that looks correct but doesn't match what n8n actually validates against.

This is a widely reported problem in the n8n community. The error message "Could not find property option" is n8n's way of saying: "I found a parameter structure I don't recognize for this node type and version."

Even small deviations — a wrong property name, an outdated typeVersion, or a misplaced field — cause silent failures where the workflow appears blank with an "Add first step..." prompt.

Isolating the Culprit: Node by Node

I stripped the workflow down to the bare minimum and added nodes back one at a time:

Webhook + Code + Respond to Webhook — imports fine
Webhook + Code + Code + Respond to Webhook — imports fine
Webhook + Code + Switch + Respond to Webhook — FAILS

The Switch node was the culprit. Its parameter schema changed between n8n versions, and Claude was generating the old format.

The Diff: What Claude Generated vs. What n8n Expects

I manually created a Switch node in the n8n UI, exported the workflow, and compared the JSON side by side. The differences were small but fatal:

PropertyClaude Generated (Wrong)n8n v2.11.3 Expects (Correct)
Rules wrapperrules.rulesrules.values
Switch typeVersion3 or 3.23.4
Conditions versionversion: 2version: 3
Condition ID placementOn the rule objectInside each condition
caseSensitive defaultfalsetrue

Five differences. That's it. Five small schema mismatches that made the entire workflow unimportable. The biggest one — rules.rules vs rules.values — is just a property name change between n8n versions. But it's enough to trigger "Could not find property option."

The Correct Switch Node Schema (n8n v2.11.3)

For anyone hitting this error, here's the exact Switch node structure that n8n v2.11.3 accepts:

{
  "parameters": {
    "rules": {
      "values": [              // NOT "rules"
        {
          "conditions": {
            "options": {
              "caseSensitive": true,   // NOT false
              "leftValue": "",
              "typeValidation": "strict",
              "version": 3             // NOT 2
            },
            "conditions": [
              {
                "leftValue": "={{ $json.myField }}",
                "rightValue": "someValue",
                "operator": {
                  "type": "string",
                  "operation": "equals"
                },
                "id": "uuid-here"      // ID goes HERE
              }
            ],
            "combinator": "and"
          }
        }
      ]
    },
    "options": {}
  },
  "type": "n8n-nodes-base.switch",
  "typeVersion": 3.4               // NOT 3 or 3.2
}

Other Nodes That Break (And Their Fixes)

Set (Edit Fields) Node — Just Don't Use It

The Set node has a complex, version-sensitive parameter schema with assignments, includeOtherFields, type definitions, and nested objects. AI-generated Set node parameters almost always fail validation. The fix is simple: use Code nodes instead. Code nodes accept raw JavaScript and have no complex parameter schema to get wrong.

// Instead of a Set node, use a Code node:
{
  "parameters": {
    "jsCode": "const input = $input.first().json;\nreturn [{\n  json: {\n    myField: input.something || ''\n  }\n}];"
  },
  "type": "n8n-nodes-base.code",
  "typeVersion": 2
}

Execute Workflow Node — Skip the __rl Wrapper

Claude generates the __rl resource locator wrapper for the workflow ID, which is what n8n uses internally. But for import, you need a plain string:

Wrong

"workflowId": {
  "__rl": true,
  "value": "abc123",
  "mode": "id"
}

Correct

"workflowId": "abc123"

Webhook Node — Needs webhookId

The Webhook node in v2.11.3 requires a webhookId field at the node level (not inside parameters). It also needs typeVersion: 2.1, not 2. Missing either of these causes subtle failures.

Respond to Webhook — Version Matters

Must be typeVersion: 1.5, not 1 or 1.1. Claude consistently generates the old version.

Node TypeVersions Cheat Sheet (n8n v2.11.3)

NodetypeVersionNotes
webhook2.1Must include webhookId field
respondToWebhook1.5NOT 1 or 1.1
code2Safest for data transformation
switch3.4NOT 3 or 3.2 — schema differs significantly
executeWorkflow1Plain string workflowId, NOT __rl wrapper
manualTrigger1Standard

Required Top-Level Workflow Structure

Beyond individual nodes, the workflow JSON itself needs specific top-level fields. Missing any of these can cause import failures or unexpected behavior:

{
  "name": "Workflow Name",
  "nodes": [],
  "pinData": {},                    // Required, even if empty
  "connections": {},
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",       // Often missed
    "availableInMCP": false          // Often missed
  },
  "tags": []
}

// Do NOT include: versionId, meta, or id
// — n8n generates these on import

Other Gotchas

Node IDs Must Be UUIDs

Claude loves generating human-readable IDs like "webhookTrigger" or "parsePayload". n8n expects UUIDs: f47ac10b-58cc-4372-a567-0e02b2c3d479. Using string IDs doesn't always cause an import error, but it can cause downstream issues with node references and execution tracking.

Connections Use Names, Not IDs

Connections between nodes reference node names (display names), not IDs. If you rename a node, you need to update all its connections too. For Switch nodes with multiple outputs, each output is a separate array in the connections object.

Node Field Order Matters (Sometimes)

While JSON is technically unordered, n8n's own export format follows a consistent field order: parameters, type, typeVersion, position, id, name. Following this order reduces the chance of parser edge cases, and makes diffing against n8n exports easier.

The Debugging Playbook

If you hit "Could not find property option" or any import failure, here's the process that actually works:

  1. Start minimal — create a workflow with just Webhook + Respond to Webhook (known-good baseline)
  2. Add one node at a time — import after each addition to isolate which node breaks it
  3. Export from the n8n UI — if you're unsure about a node's schema, add it manually in the n8n editor, export the workflow, and copy the exact parameter structure
  4. Check typeVersion first — most failures come from using outdated typeVersions
  5. Check the Switch node — it's the #1 failure point. Verify rules.values (not rules.rules), typeVersion 3.4, and conditions version 3
  6. Never guess Set node schemas — use Code nodes instead, every time

The Permanent Fix: A Generation Guide

After documenting every schema difference, I built an n8n Workflow Generation Guide and baked it directly into my project's CLAUDE.md file — the instruction file that Claude Code reads before doing any work.

The guide contains the exact typeVersions, correct parameter schemas for every common node, a complete working example workflow, and a debugging checklist. Now when I ask Claude Code to generate an n8n workflow, it follows these rules and produces importable JSON on the first try.

The key insight: AI coding tools are powerful, but they hallucinate schemas. When you're working with strict validation systems like n8n, you need to export from the real system, compare against what the AI generates, codify the correct patterns, and feed them back into the AI's context. Don't fight the AI — teach it.

The Takeaway

This debugging session cost me hours, but the generation guide saves me hours on every workflow I build going forward. The pattern is universal:

  • 1.When AI-generated output fails validation in a strict system, don't blame the AI — the system's schema is underdocumented
  • 2.Export a working example from the real system and diff it against the AI's output
  • 3.Document every deviation and feed it back into the AI's instructions
  • 4.The AI gets it right every time after that — the upfront cost pays for itself immediately

Building in public means sharing the ugly debugging sessions too. Not every post is a success story — sometimes the most valuable thing you can share is the hours you spent staring at a wrong property name.


Built with n8n (v2.11.3), Claude Code, Railway (Primary + Worker + Postgres + Redis). Debugged with patience.

More Case Studies