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 with the "Issue Opened" event
- Node 2: IF node that checks if the issue label contains "bug"
- True branch: Slack node posts a message to #engineering-bugs with issue title, body, and link
- False branch: Slack node posts a 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
n8n
Workflow automation for technical teams
Workflow AutomationZapier
Automate workflows between apps without coding—connect 9,000+ tools with simple, reliable automation.
Workflow AutomationMake
Automate your work with visual workflow builder and AI agents
Workflow AutomationActivepieces
No-code workflow automation with self-hosting and AI-powered features
Workflow AutomationRelated Rankings
Best Human-in-the-Loop Automation Platforms 2026
Eight platforms are ranked here on a single mechanism: how a person enters an automated path, and what the system can prove afterward about the decision they made. Moxo scores 7.7 and ranks first; Camunda 8 scores 7.2, Microsoft Power Automate 7.1, Pega 6.9, n8n 6.7, Zapier 5.9, Kissflow 5.8 and ServiceNow 4.8, scored 22 September 2026 on the five weighted criteria. Those criteria cover the step type, the approver's account or licence, the routes available on a rejection, the audit record, and the meter that charges for the decision, and none of them can tell a review from a rubber stamp, so the methodology adds a check readers can run on any product in a few minutes: whether the decision record tells a considered approval from an instant one. Every figure was read from a vendor-owned surface and carries its own date.
Best Automation Platforms for AI Orchestration 2026
This ranking answers one question: how many real business applications can an AI agent act on out of the box? It evaluates nine platforms as of August 2026 on the reach they give an agent, not on the workflow logic they can express. That boundary is deliberate, because two neighbouring pages on this site answer different questions. Best Process Orchestration Platforms 2026 scores multi-step process control, error handling and state management. Best AI Agent Platforms 2026 scores building and hosting the agent itself. This page scores the layer between them: the connective tissue that lets an agent already built elsewhere reach the applications a business actually runs on. A platform that leads one of those pages can place low here, and two of them do. Scores derive from application and action catalogue counts, the exposure model each platform uses to publish those catalogues to an agent, setup effort, failure handling and cost per agent action. Every figure was retrieved from a vendor-owned surface on 11 August 2026 unless an earlier date is stated against it.
Dive Deeper
Moxo vs Gumloop in 2026: Texting the Client, or Building the Agent
Gumloop (founded 2023) builds AI agents a company's own staff run; Moxo, whose predecessor Moxtra was co-founded in 2012, runs processes that wait on people outside the company. Gumloop wins three rounds to two: the way in, per-tool gating and a priced overage. Moxo wins on texting a client a step and on what that client can be asked to do. Vendor pages and docs were read on 28 September 2026.
Moxo vs Relay.app in 2026: Where Relay's Approval Workflows Can Go Next
Relay.app, founded in 2021, shut down in September 2026 and deleted every account, workflow and run history; Moxo, whose predecessor Moxtra was co-founded in 2012, is one destination for its human-in-the-loop users. Relay.app takes two rounds, Moxo one, and vendor risk is a draw. The page maps which Relay steps Moxo replaces, on which plan, and what the shutdown teaches about exports, from sources read 28 September 2026.
Moxo vs Workato in 2026: The Integration Estate, or the Approval Inside It
Workato, founded in 2013, is an enterprise integration platform whose Workflow apps add human tasks to recipes; Moxo, whose predecessor Moxtra was co-founded in 2012, ships the human step itself. Workato wins three rounds to two: connector reach, change control and the way in. Moxo wins the human step and retries. Vendor pages and docs were read on 28 September 2026.