Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/n8n skills/Nodes-data-and-expressions
Reference · n8n skills

Nodes-data-and-expressions

Part of n8n skills. Install the skill and your agent reads this page when it needs the depth.

Nodes, Data, and Expressions

Node Categories

Use these categories when designing or auditing workflows:

Item Model

n8n passes arrays of items. Design with this mental model:

[
  {
    "json": {
      "id": "external-id",
      "status": "ready",
      "payload": {}
    },
    "binary": {}
  }
]

Rules:

Expression Rules

Use expressions for lightweight value mapping, not large business logic.

Good expression use:

={{ $json.customer.email }}
={{ $now.toISO() }}
={{ $json.amount_cents / 100 }}

Risky expression use:

Code Node Rules

Use Code nodes only when built-in nodes become unreadable. Keep them small, deterministic, and free of credentials.

Recommended Code node contract:

return items.map((item) => {
  const input = item.json;
  return {
    json: {
      correlation_id: input.correlation_id,
      normalized: true,
      payload: input.payload,
      generated_at: new Date().toISOString()
    }
  };
});

Avoid:

Branching

Use If for binary decisions and Switch for multi-route decisions.

Each branch should define:

Merge Design

Before using Merge, define whether the workflow needs:

Many n8n bugs come from merging arrays with mismatched item counts. When in doubt, normalize to a dictionary keyed by stable ID in a Code node or sub-workflow.

Looping and Pagination

For paginated APIs:

Do not create unbounded loops.

Webhook Response Design

For public webhook intake:

Example response:

{
  "status": "accepted",
  "correlation_id": "evt_123",
  "message": "request accepted for processing"
}

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.