How to build an n8n workflow from scratch
Quick Answer: n8n is an open-source workflow automation platform. To build a workflow, create a new workflow in the editor, add a trigger node (webhook, cron, or app event), connect function nodes for data processing, configure credentials for external services, and execute.
How to Build an n8n Workflow from Scratch
n8n is a source-available workflow automation tool that can be self-hosted or run on n8n Cloud (starting at $20/month as of April 2026). Self-hosting provides unlimited workflow executions at no per-run cost. This guide covers building a workflow using the n8n visual editor.
Step 1: Create a New Workflow
Open the n8n editor (self-hosted at the configured URL, or at app.n8n.cloud). Click "New Workflow" in the top-left menu. The editor opens with a blank canvas and a start node.
Step 2: Add a Trigger Node
Click the "+" button on the start node or use the node panel on the left. Select a trigger:
- Webhook — Receives HTTP requests from external services
- Cron — Runs on a schedule (every hour, daily, custom cron expression)
- App triggers — Listen for events from integrated apps (Gmail new email, Slack new message, GitHub new push)
- Manual Trigger — Execute the workflow manually from the editor
Step 3: Add Processing Nodes
Connect additional nodes to transform and route data:
- HTTP Request — Call any REST API endpoint
- Set — Define or rename data fields
- IF — Branch based on conditions
- Switch — Route to multiple branches based on field values
- Code — Execute custom JavaScript or Python
- Merge — Combine data from multiple branches
Drag from one node's output to another node's input to create connections.
Step 4: Configure Credentials
Nodes that connect to external services require credentials. Click on a node, navigate to the "Credentials" section, and click "Create New." Enter API keys, OAuth tokens, or username/password combinations. n8n encrypts and stores credentials separately from workflow definitions.
Step 5: Test Individual Nodes
Click on any node and press "Execute Node" to run it in isolation with sample data. Review the output in the right panel. This is the fastest way to debug data transformations and API calls without running the entire workflow.
Step 6: Execute the Full Workflow
Click "Execute Workflow" in the top toolbar to run the complete workflow. The editor highlights each node as it executes, showing the data flowing between them. Green indicators show successful executions; red indicators show errors with detailed messages.
Step 7: Activate the Workflow
Toggle the "Active" switch in the top-right corner. Active workflows run automatically when their trigger fires. Inactive workflows can still be executed manually.
Practical Example: GitHub Issue to Slack Notification
- Trigger: GitHub Trigger node — "Issue Opened" event
- Node 2: IF node — Check if issue label contains "bug"
- True branch: Slack node — Post message to #engineering-bugs with issue title, body, and link
- False branch: Slack node — Post message to #general-issues
Self-Hosting Notes
n8n can be self-hosted via Docker, npm, or Kubernetes. The recommended approach is Docker Compose with a PostgreSQL database for workflow storage. Self-hosted instances require manual updates and backup configuration.
Related Questions
Related Tools
Activepieces
No-code workflow automation with self-hosting and AI-powered features
Workflow AutomationAutomatisch
Open-source Zapier alternative
Workflow AutomationBardeen
AI-powered browser automation via Chrome extension
Workflow AutomationCalendly
Scheduling automation platform for booking meetings without email back-and-forth, with CRM integrations and routing forms for lead qualification.
Workflow AutomationRelated Rankings
Best Project Management Automation Tools in 2026
A ranked list of the best project management automation tools in 2026. This ranking evaluates platforms across automation engine quality, project views, integration ecosystem, pricing, and scalability for growing teams. The ranking includes dedicated PM platforms with built-in automation (Monday.com, Asana, ClickUp, Jira, Trello), flexible workspace tools used for PM (Notion), and spreadsheet-based PM solutions (Smartsheet).
Best CRM Automation Tools in 2026
A ranked list of the best tools for automating CRM workflows in 2026. This ranking evaluates platforms across CRM depth, automation builder quality, integration ecosystem, pricing value, and enterprise readiness. The ranking includes CRM-native automation platforms (Salesforce Flow, HubSpot Operations Hub, Zoho Flow), general-purpose automation tools (Zapier, Make, Power Automate), and marketing automation tools with CRM capabilities (ActiveCampaign).
Dive Deeper
How to Create an Internal Tool with Retool and PostgreSQL
A tutorial for building a CRUD admin panel using Retool connected to a PostgreSQL database. Covers data source connection, table components, detail views, create/update/delete operations, search, role-based access, and security. Built in 6 hours for a 20-person operations team at $200/month versus an estimated 3-4 weeks for custom development.
Slack vs Microsoft Teams: Complete Comparison (2026)
A comparison of Slack and Microsoft Teams for workplace automation in 2026. Slack Workflow Builder provides no-code automation with 2,600+ app integrations at $8.75/user/month. Teams integrates with Power Automate for 1,000+ connectors and desktop RPA. Pricing analysis for 50-person organizations included.
Notion vs Coda: Complete Comparison (2026)
A comparison of Notion and Coda as database-document hybrid platforms in 2026. Notion offers 30M+ users with a broad template ecosystem and per-member pricing. Coda provides deeper formula-driven logic and Packs integrations with per-doc-maker pricing. Includes cost analysis for teams of 20.