Automating for real with n8n
Guiden8n1 min read
automationn8nself-host
n8n has become my Swiss Army knife for automation: open source, self-hosted, and flexible enough to stay out of my way when a flow grows.
Why self-host
Keeping n8n on my own infrastructure means the data never leaves the machine until I decide it should. For workflows touching sensitive information, that's the difference between "doable" and "not a chance".
- Full control over versions and dependencies
- No artificial cap on the number of executions
- Freedom to put a reverse proxy in front and handle auth my way
The webhook → validate → act pattern
Most useful flows start with a webhook. My rule is simple: always validate the input before doing anything.
// Pseudo-logic of a Function node
if (!body.email || !body.email.includes('@')) {
throw new Error('Invalid email')
}
return { json: { ok: true } }
A webhook without validation is just an elegant way to fill your database with garbage.
Integrating LLMs without blowing up costs
When I add an LLM node to a flow, I treat it as an expensive, fallible call:
- Aggressive caching on repeated inputs
- Explicit timeouts
- A deterministic fallback when the model doesn't answer
Automation has to stay predictable even when the "smart" part throws a tantrum.