This content originally appeared on DEV Community and was authored by Youvandra Febrial
Automate Like a Pro: Your First n8n Workflow in 5 Minutes đ
Ever felt like youâre writing the same boilerplate code over and over?
What if you could stitch together APIs, databases, and even your favorite Slack channel without pulling an allânight hackathon?
Enter n8n â the openâsource workflow engine that lets you build âifâthisâthenâthatâ automations with a visual canvas (and a dash of code when you need it).
In this post Iâll walk you through getting n8n up and running, creating a tiny but useful workflow, and dropping a few proâtips you can copyâpaste into your next project. Letâs dive! đ
1ď¸âŁ Why n8n? (Quick TL;DR)
- Open source â selfâhost or use the managed cloud, no vendor lockâin.
- Nodeâbased UI â dragâandâdrop, but you can also write custom JavaScript.
- 100+ integrations â from GitHub to Google Sheets, all ready to go.
- Runs everywhere â Docker, Vercel, Railway, even a Raspberry Pi.
If youâve ever used Zapier or IFTTT, think of n8n as the âhackerâfriendlyâ cousin that gives you full control over inputs, outputs, and error handling.
2ď¸âŁ Getting n8n Up & Running
2.1. Choose your playground
Option | When to pick it | Command |
---|---|---|
Docker (recommended) | You want a oneâliner that works on any OS | docker run -it --rm -p 5678:5678 n8nio/n8n |
npm | You already have Node.js installed and love CLI | npm i -g n8n && n8n start |
Managed Cloud | No ops hassle, just signâup at https://app.n8n.io | â |
Tip: If youâre on a Mac with Homebrew, you can also
brew install n8n
.
2.2. Verify the UI
Open your browser â http://localhost:5678
â you should see the n8n canvas with a friendly âWelcome to n8n!â banner. đ
3ď¸âŁ Build Your First Workflow: âNew GitHub Issue â Slack Alertâ
3.1. Highâlevel steps
- Trigger â Listen for a new issue on a GitHub repo.
- Function â Add a custom emoji and format the message.
- Slack â Post the formatted text to a channel.
3.2. Stepâbyâstep
3.2.1. Add the GitHub Trigger
- Click + â search âGitHubâ â pick GitHub Trigger.
- Choose Event:
Issue Created
. - Connect your GitHub account (OAuth flow).
- Set the Repository (e.g.,
myorg/myâawesomeârepo
).
3.2.2. Insert a Function Node
- Drag a Function node onto the canvas, link it to the GitHub trigger.
- Paste this JavaScript snippet:
// n8n Function node â transform GitHub payload into a Slack message
return [
{
json: {
text: `đ¨ *New Issue:* <${$json["html_url"]}|#${$json["number"]}> â ${$json["title"]}`,
username: "n8n Bot",
icon_emoji: ":robot_face:",
},
},
];
Why a Function node?
It lets you shape the data exactly how Slack expects it, without writing a separate microâservice.
3.2.3. Hook up the Slack Node
- Add a Slack node â Post â Message.
- Connect it to the Function node.
- Authorize Slack (select workspace, channel, etc.).
- In the Message field, pick the Expression button and select
{{$json["text"]}}
.
3.2.4. Activate & Test
- Click Save â Activate (toggle in the topâright).
- Open a new issue in the GitHub repo; you should see a ping in Slack within seconds.
3.3. Export the workflow (JSON)
You can share the whole thing as a JSON file:
{
"name": "GitHub Issue â Slack Alert",
"nodes": [
{
"parameters": {
"events": [
{
"event": "issues",
"operation": "opened"
}
],
"repository": "myorg/my-awesome-repo"
},
"name": "GitHub Trigger",
"type": "n8n-nodes-base.githubTrigger",
"typeVersion": 1,
"position": [250, 300]
},
{
"parameters": {
"functionCode": "// n8n Function node â transform GitHub payload into a Slack message\nreturn [{\n json: {\n text: `đ¨ *New Issue:* <${$json[\"html_url\"]}|#${$json[\"number\"]}> â ${$json[\"title\"]}`,\n username: \"n8n Bot\",\n icon_emoji: \":robot_face:\",\n },\n}];"
},
"name": "Format Message",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [500, 300]
},
{
"parameters": {
"channel": "C01ABCD2EFG",
"text": "={{$json[\"text\"]}}",
"username": "={{$json[\"username\"]}}",
"icon_emoji": "={{$json[\"icon_emoji\"]}}"
},
"name": "Slack Notify",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [750, 300]
}
],
"connections": {
"GitHub Trigger": {
"main": [
[
{
"node": "Format Message",
"type": "main",
"index": 0
}
]
]
},
"Format Message": {
"main": [
[
{
"node": "Slack Notify",
"type": "main",
"index": 0
}
]
]
}
}
}
Drop the JSON into Import â Workflow and youâre good to go.
4ď¸âŁ Pro Tips & Tricks đŻ
- Version control â Store exported JSON files in Git. Treat workflows like code!
-
Error handling â Add a Set node after any step to capture
$node["<node>"].error
and route it to a Telegram or Email alert. - Cron triggers â Want a nightly data sync? Use the Cron node instead of an external scheduler.
- Custom nodes â If the builtâin list doesnât have your API, create a JavaScript node or publish a reusable npm package (see the n8n docs).
- Docker compose â For production, spin up n8n with a Postgres DB and Redis queue:
version: "3.8"
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=supersecret
depends_on:
- postgres
postgres:
image: postgres:13
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=supersecret
- POSTGRES_DB=n8n
- Community recipes â Check out the n8n.io/workflows gallery. Youâll find readyâmade templates for everything from RSS â Notion to Stripe â Google Sheets.
5ď¸âŁ WrapâUp & CallâtoâAction
You now have a live n8n instance, a working workflow, and a toolbox of tricks to keep building more complex automations. Remember:
- Treat workflows as code â version, test, and review them.
- Leverage the visual canvas for quick prototyping, then sprinkle in JavaScript for the heavy lifting.
- Iterate fast â a tiny change (e.g., add a âpriorityâ label filter) can turn a basic alert into a fullyâfeatured triage bot.
Got a quirky automation idea? đ Drop a comment below, share your workflow JSON, or ask for help tweaking a node. Letâs build a community of n8n ninjas together!
References
- n8n Docs â https://docs.n8n.io/
- Official Docker Image â https://hub.docker.com/r/n8nio/n8n
- Community Workflow Gallery â https://n8n.io/workflows
Happy automating! đ
This content originally appeared on DEV Community and was authored by Youvandra Febrial

Youvandra Febrial | Sciencx (2025-08-30T17:11:41+00:00) Getting started with n8n. Retrieved from https://www.scien.cx/2025/08/30/getting-started-with-n8n/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.