Architecture

n8n vs custom code: how I choose

A form comes in, a record is updated, a task is created and someone gets an alert. I would start that job in n8n. A queue with permissions and approval history calls for an application.

n8n is good at connecting services and scheduling steps. Its visual chain makes a routine transfer easy to inspect. Self-hosting, backups and documented credentials make that chain a maintainable part of the system.

When the workflow needs memory

Consider a document that has to be checked, corrected and approved. n8n can receive it and notify a reviewer. The document version, validation result, who may approve it and what they decided need persistent records and rules. I would put those in a small application with a review screen.

Trying to hold every state and permission in a long visual chain makes changes harder to inspect. Moving everything into code would also mean rebuilding integrations n8n already handles well. The two can work together.

Before choosing the split, I ask what must still be there tomorrow, who may change it and what should happen if a connected service is unavailable. The answers determine which part of the process needs a database and interface.

Related work

See both parts of the build

Read about the workflow layer and the internal tool that can hold records and decisions.

See an automation example