n8n vs custom Python agents: choosing your business automation stack

The short answer: n8n when the work is gluing SaaS tools together, custom Python when the work is the product or needs real logic, and very often both — n8n as the scheduler and integration layer, a small Python service doing the thinking. We run both in production; here is where each actually earns its keep.

What n8n is genuinely great at

  • Integrations you don’t want to write: hundreds of connectors — Sheets, Gmail, Slack, WhatsApp, CRMs — with auth handled for you.
  • Visibility: non-engineers can read a canvas, see where a run failed, and re-run it. That transparency is worth real money in a small team.
  • Speed to first value: a lead-capture → enrich → notify flow is an afternoon, not a sprint.
  • Self-hosting: one Docker container, your data stays yours, no per-task pricing surprises.

Where visual workflows quietly fall apart

  • Real logic. Branching, retries with state, dedup across runs, anything that smells like an algorithm — a canvas of 60 nodes is code you can’t diff, test or review.
  • LLM-heavy work. Prompt chains, structured output validation, token budgets, model fallbacks — doable in n8n, but you end up writing code inside string fields, which is the worst of both worlds.
  • Version control and testing. Exported JSON blobs don’t review like a pull request, and there is no unit test for a canvas.

What a custom Python agent buys you

A small FastAPI or worker service — a few hundred lines — gives you git history, code review, tests, structured logging, and the freedom to do exactly what the business needs: rate-limited outreach with dedup, safety rules that must never be bypassed, LLM calls with hard budget caps. When the automation touches customers or money, these stop being nice-to-haves.

The hybrid pattern that usually wins

Let n8n own triggers, schedules and third-party connections; put the judgement in a small custom service n8n calls over HTTP. The canvas stays readable, the logic stays testable, and each side does what it’s good at. Cost of the whole stack, self-hosted: one modest server.

A one-minute decision list

  • Mostly moving data between SaaS tools? n8n.
  • The automation is customer-facing, safety-critical or LLM-centric? Custom.
  • Non-engineers need to see and tweak it? n8n front, custom core.
  • You’re about to write JavaScript inside an n8n code node for the fifth time? That’s the sign. Move the logic to a service.

Automating a workflow and unsure which way to build it?

We run both n8n and custom Python agents in production and we'll tell you which fits your case — sometimes the honest answer is the cheaper one. Book a free 20-minute call.

Book a free 20-min call