n8n: fair-code workflow automation, and how I structure flows with it
n8n is a visual workflow automation platform you can self-host, with code where you need it. Its licence, what it's best at, and the n8n-plus-API pattern most of my automations use.
Repo: n8n-io/n8n · fair-code under the Sustainable Use License (plus an enterprise licence)
n8n is the workflow automation tool I recommend most often, and it shows up throughout my automation notes. Before getting to how I use it, one thing worth being precise about.
"Open source" — with an asterisk
n8n describes itself as fair-code: the source is public and you can self-host it, but it's distributed under the Sustainable Use License, not a traditional open-source licence. For running your own automations, that's rarely a problem. If you plan to resell n8n itself as a hosted service, read the licence first.
What it's best at
- Connecting SaaS tools — CRM, email automation, forms, spreadsheets, chat — with hundreds of ready-made integrations.
- Mixing visual and code — drop into a code node when a transformation is easier to write than to click.
- Running where your data lives — self-host it next to your database, or use n8n Cloud.
- AI steps — native nodes for calling models, which makes enrichment and classification easy to add.
The pattern I use: n8n at the edges, an API in the middle
Most of my systems look like this:
- n8n handles triggers and integrations — a new form submission, a schedule, a webhook from a payment provider.
- One HTTP call to a small FastAPI service does the real logic: validation, AI calls with structured outputs, database writes.
- n8n handles delivery — the email, the Slack or Telegram message, the CRM update.
The visual flow stays readable for non-developers. The logic stays testable in code. I explain the decision rules in n8n or code?.
Five automations worth building first
- New lead → CRM record → welcome email sequence → notify the owner.
- Order paid → fulfilment sheet → thank-you email → review request a week later.
- Daily report → pull metrics → post a summary to chat.
- Form answers → tag contacts by answer → different follow-ups.
- Error in any flow → message to a monitored channel.
Habits that keep flows healthy
Name every node by what it does, add an error workflow, version-export important flows, and never hide business logic in five nested IF nodes when ten lines of code would say it plainly.
Some links in these notes are affiliate links. If you buy through one, I may earn a commission at no extra cost to you. I only link to tools I use or would recommend.