---
name: n8n-workflow-builder
description: "Design and ship n8n automations — node selection, credential setup, error handling, deploy-ready JSON. Plans n8n workflows from a plain-English brief: which nodes to use, how to chain them, where to add error branches, credential setup, and outputs a deploy-ready workflow JSON. Covers webhooks, schedules, AI nodes, and the common 'wait for response' patterns."
license: MIT
---

# n8n Workflow Builder

Turn a plain-English brief into a working n8n workflow. This skill plans the node graph, wires triggers to actions, inserts error-handling branches, lists the credentials you'll need, and emits a JSON file you can import directly into the n8n editor. It's aimed at developers and ops folks who know what they want automated but don't want to hand-assemble nodes and expressions in the canvas.

## When to use it

- You have a one-line idea ("when a Stripe webhook fires, look up the customer in HubSpot and post to Slack") and want the full graph scaffolded.
- You need a scheduled job (poll an API every 15 minutes, dedupe, write to Postgres) with retry and failure alerting already in place.
- You're building an AI step — summarize inbound email, classify a ticket, draft a reply — and want the Agent / LLM nodes wired with the right input mapping.
- You want a synchronous webhook that does work and returns a response to the caller (the "Respond to Webhook" pattern).

## How it works

The skill reasons about n8n's node model and produces importable JSON (the same shape you get from **Export → Download** in the editor: a `nodes` array, a `connections` map, and `settings`). It selects from real nodes — **Webhook**, **Schedule Trigger**, **HTTP Request**, **IF** / **Switch**, **Code**, **Set / Edit Fields**, **Merge**, the **AI Agent** and **Basic LLM Chain** nodes, and **Respond to Webhook**. Branching uses n8n expression syntax (`{{ $json.field }}`, `$node["Name"].json`). For resilience it sets per-node **Retry On Fail** and routes failures through an **Error Trigger** workflow or a node's error output. Credentials are never invented — the skill names the credential type each node requires (e.g. `httpHeaderAuth`, `slackApi`) and leaves you to fill secrets in n8n's credential store.

## Example

```bash
curl -fsSL --create-dirs -o ~/.claude/skills/n8n-workflow-builder/SKILL.md https://claudeskil.com/skills/n8n-workflow-builder/SKILL.md

# Then describe the workflow:
"Every hour, GET https://api.example.com/orders, keep only status=paid,
upsert each into Postgres, and Slack me if the HTTP call fails."
```

You get `workflow.json` plus a node-by-node rundown and the credentials to configure. Import via **Workflows → Import from File**.

## Tips & gotchas

- After import, **re-select each credential** — credential IDs don't transfer between instances, so dropdowns will show empty.
- For sync webhooks, set the Webhook node's **Respond** to "Using Respond to Webhook Node," or the caller gets an immediate 200 with no body.
- **Retry On Fail** only catches transient errors; logic errors still need an IF guard or error output.
- Pin the n8n version when sharing JSON — node `typeVersion` differs across releases and a mismatch can break parameters on import.

## FAQ

**Does it run the workflow?** No. It produces import-ready JSON and setup notes; you execute inside n8n.

**Cloud or self-hosted?** Both. The JSON is identical; only credential setup differs.

**Can it use community nodes?** It targets core/verified nodes by default. Name a community node explicitly and it'll wire it, but you must install that node first.
