n8n Cheat Sheet & Node Reference
A beginner-friendly n8n cheat sheet. Learn how n8n works, essential nodes, webhook setups, and the differences between self-hosted and cloud.
What is n8n?
n8n is a fair-code, workflow automation tool. It allows you to connect any app with an API to another app to automate tasks without writing code (though you can write JavaScript if you want).
Best Practice
Think of n8n as the 'glue' between different software platforms (like Gmail, Slack, and Salesforce).
Interview Tip
If asked 'Why n8n over Zapier?', mention that n8n is source-available, can be self-hosted for data privacy, and allows complex branching and looping much easier than Zapier.
How n8n Works
Every automation in n8n is called a 'Workflow'. A workflow is made of 'Nodes'. There are two main types of nodes: Trigger Nodes (which start the workflow) and Action Nodes (which do something).
Example
Trigger Node: "On new email in Gmail"
--> Action Node: "Extract text"
--> Action Node: "Send message to Slack"Common Mistake
Forgetting that a workflow MUST start with a Trigger Node (like a Webhook, Cron schedule, or App trigger) to run automatically.
Self-Hosted vs Cloud
You can pay n8n to host your workflows (n8n Cloud), or you can host it yourself on your own server for free (Self-Hosted).
Best Practice
Use n8n Cloud if you don't want to deal with server maintenance or security. Use Self-Hosted if you have strict data privacy laws (like HIPAA or GDPR) or want unlimited executions for free.
The Code Node (JavaScript)
While n8n is 'no-code', the Code Node lets you write custom JavaScript to transform data exactly how you want it.
Syntax
// Example Code Node structure
return items.map(item => {
item.json.myNewField = "Hello " + item.json.name;
return item;
});Common Mistake
Forgetting to return the data in the required n8n array format. Your code MUST return an array of objects where each object has a `json` property.
Webhook Nodes
Webhooks allow n8n to receive data from ANY external service instantly. They give you a unique URL that other apps can send HTTP POST requests to.
Syntax
// Standard Webhook URL format
https://your-n8n-instance.com/webhook/unique-idCommon Mistake
Testing a live webhook URL instead of the 'Test' webhook URL. n8n provides a specific Test URL so you can see incoming data while building the workflow.
Interview Tip
Understand the difference between Polling (checking every 5 minutes) and Webhooks (instant push). Webhooks are vastly superior for performance.
Frequently Asked Questions
Is n8n completely free?
The source code is free to download and self-host under their 'Fair-Code' license, meaning it's free for internal use but you cannot resell n8n as a service.
Can I use Python in n8n?
By default, the Code Node uses JavaScript. However, you can run Python scripts using the 'Execute Command' node to run a script on your host machine.