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
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 Durable Workflow Engines for Production in 2026
A ranked list of the best durable workflow engines for production deployments in 2026. Durable workflow engines persist execution state to a database so that long-running workflows survive process restarts, deployments, and infrastructure failures. The ranking covers Temporal, Prefect, Apache Airflow, Camunda, Windmill, and n8n. Tools were evaluated on production reliability, developer experience, scalability, open-source health, and documentation quality. The shortlist intentionally mixes code-first engines (Temporal, Prefect, Airflow) with hybrid visual platforms (Camunda, Windmill, n8n) to reflect how production teams actually choose workflow engines in 2026.
Best No-Code Automation Platforms in 2026
A ranked list of no-code automation platforms in 2026. The ranking covers visual workflow builders that allow non-engineering teams to connect SaaS apps, route data, and add conditional logic without writing code. Entries cover proprietary cloud platforms (Zapier, Make, Pipedream, IFTTT) and open-source visual builders (n8n, Activepieces). Scoring reflects integration breadth, pricing accessibility, visual editor ease, reliability and error handling, and self-hosting availability.
Dive Deeper
Keystroke vs n8n in 2026: Agent-Built TypeScript vs the Visual Canvas
Keystroke, launched in July 2026 by Y Combinator W24 company Sprint Labs, is a code-first automation platform where AI coding agents write workflows as TypeScript in the user's repository. n8n, founded in 2019, is the most widely deployed source-available visual workflow platform, with 200,000+ users and a $2.5 billion valuation. This comparison covers the agent-authored versus canvas building models, durable execution, licensing (Elastic License 2.0 vs the Sustainable Use License), verified July 2026 pricing including Keystroke's usage metering, and the maturity gap between a days-old platform and an established ecosystem.
QuantumBPM vs Camunda 2026: Single-Binary Challenger vs the BPMN Incumbent
QuantumBPM (launched 2026, Coroid s.r.o., Slovakia) packages a BPMN 2.0 runtime and DMN 1.5 decision engine into one Go binary backed by Temporal and PostgreSQL. Camunda (Berlin, founded 2013) is the category incumbent: Camunda 7 (Apache 2.0, in maintenance) and the Zeebe-based Camunda 8 platform. This comparison covers product structure, architecture, DMN TCK conformance with recording dates, deployment, pricing, and vendor maturity, verified July 2026.
Migrating 23 Make Scenarios to Self-Hosted n8n: a 3-Week Breakdown
Anonymized retrospective of a DTC ecommerce brand migrating 23 Make scenarios to a self-hosted n8n instance over three weeks. Tooling cost dropped from $348/month on Make Teams to roughly $12/month on a Hetzner VPS, but credential and webhook recreation consumed about 40% of total project time.