Building a First n8n Workflow: A Step-by-Step Tutorial
Step-by-step tutorial for building a GitHub-to-Slack notification workflow in n8n with conditional routing and logging.
The Bottom Line: A basic n8n workflow connecting a webhook trigger to a conditional branch and two output actions can be built and tested in under 30 minutes; n8n's visual canvas and built-in execution log make debugging straightforward for first-time users.
Building Your First n8n Workflow: A Step-by-Step Tutorial
n8n is a powerful workflow automation platform that gives teams visual building and code-level control in one tool. This tutorial walks you through building a first real workflow from scratch.
What We Will Build
We will create a workflow that monitors a GitHub repository for new issues and sends a formatted notification to a Slack channel with issue details. This is a practical, real-world automation that many development teams use.
Workflow Architecture
Here is the overall flow of our automation:
flowchart TD
A[GitHub Trigger: New Issue Created] --> B[Extract Issue Details]
B --> C{Is it a bug?}
C -->|Yes| D[Format Bug Alert Message]
C -->|No| E[Format General Notification]
D --> F[Send to #bugs Slack Channel]
E --> G[Send to #general Slack Channel]
F --> H[Log to Google Sheet]
G --> H[Log to Google Sheet]
Prerequisites
Before starting, make sure you have:
- n8n installed either self-hosted (Docker recommended) or a cloud account at app.n8n.cloud
- GitHub account with a repository to monitor
- Slack workspace with permission to install apps
- Google account for the Google Sheets logging step (optional)
Step 1: Set Up the GitHub Trigger
Every n8n workflow starts with a trigger node. This is the event that kicks off the automation.
- Open n8n and click Add workflow
- Click the + button to add a first node
- Search for GitHub Trigger and select it
- Click Create new credential and authenticate with your GitHub account
- Configure the trigger:
- Repository Owner: your GitHub username or organization
- Repository Name: the repo organizations want to monitor
- Events: select Issues and check opened
- Click Listen for Test Event and create a test issue in your repo to capture sample data
The trigger node will now fire every time a new issue is created in your repository.
Step 2: Extract and Transform Issue Data
Add a Set node to extract the fields we need:
- Click + after the GitHub Trigger node
- Add a Set node
- Configure the following fields:
- title:
{{ $json.issue.title }} - body:
{{ $json.issue.body }} - author:
{{ $json.issue.user.login }} - url:
{{ $json.issue.html_url }} - labels:
{{ $json.issue.labels.map(l => l.name).join(", ") }} - is_bug:
{{ $json.issue.labels.some(l => l.name === "bug") }}
- title:
This step normalizes the GitHub webhook data into a clean format for the rest of the workflow.
Step 3: Add Conditional Routing
We want bug reports to go to a dedicated channel. Add an IF node:
- Click + after the Set node
- Add an IF node
- Set the condition: is_bug equals true
- This creates two output branches: true (bugs) and false (other issues)
Step 4: Configure Slack Notifications
Add two Slack nodes, one for each branch:
Bug Alert (True branch)
- Click + on the true output
- Add a Slack node
- Connect your Slack workspace credential
- Configure:
- Channel: #bugs (or your bug channel)
- Message Text: Format a rich message:
:bug: *New Bug Report*
*Title:* {{ $json.title }}
*Author:* {{ $json.author }}
*Labels:* {{ $json.labels }}
*Link:* {{ $json.url }}
{{ $json.body }}
General Notification (False branch)
- Click + on the false output
- Add another Slack node
- Configure similarly but send to #general with a different emoji:
:clipboard: *New Issue*
*Title:* {{ $json.title }}
*Author:* {{ $json.author }}
*Link:* {{ $json.url }}
Step 5: Log to Google Sheets (Optional)
Add a Google Sheets node after both Slack nodes to maintain a log:
- Add a Merge node to combine both branches
- Add a Google Sheets node
- Connect your Google account
- Select the spreadsheet and worksheet
- Map columns: Date, Title, Author, Type (bug/other), URL
This creates an automatic issue log that the team can reference.
Step 6: Test and Activate
- Click Execute Workflow to run a test with the sample data from Step 1
- Verify each node executed successfully (green checkmarks)
- Check your Slack channels for the test notification
- Check your Google Sheet for the logged entry
- Fix any field mapping issues
- Toggle the workflow to Active in the top-right corner
Error Handling
Add error handling to make the workflow production-ready:
- Click on any node and select Settings
- Enable Continue on Fail for non-critical nodes (like the Google Sheets logging)
- Add an Error Trigger workflow that sends you a notification if the main workflow fails
- Set up retry logic for transient API failures
Next Steps
Now that organizations have a working workflow:
- Add more triggers: Monitor pull requests, comments, or releases
- Enrich notifications: Add assignee information, milestone details, or priority labels
- Build related workflows: Auto-assign issues based on labels, create Jira tickets from GitHub issues, or generate weekly summary reports
- Explore the n8n community: Browse 1,000+ workflow templates at n8n.io/workflows for inspiration
This pattern of trigger, transform, route, and action applies to virtually any automation users will build. The concepts transfer directly to more complex workflows.
Tools Mentioned
Related Guides
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.
Related 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.
Common Questions
Is Keystroke worth it in 2026?
Keystroke earns a provisional 6.5/10 in its July 2026 open alpha: the agent-native TypeScript model is genuinely differentiated and the free Hobby tier makes it safe to trial, but the platform is pre-1.0 (npm at v0.1.98, public repository published July 13, 2026), has no third-party production track record, and its Elastic License 2.0 restricts offering it as a hosted service. Worth trialing for teams that build through coding agents; too young for production-critical workflows.
How much does Keystroke cost in 2026?
Keystroke offers three tiers as of July 2026: Hobby (free forever, with $1/month of included usage credit), Pro ($20/month, including $20/month of usage credit), and Organization (custom pricing with SSO, RBAC, and audit logs). Usage is metered on every tier: $0.01 per agent or workflow run, $0.005 per empty poll, $0.007 per web search, roughly $0.067 per hour of sandbox compute, and a 1.1x markup on AI model calls unless you bring your own API keys.
What is Keystroke?
Keystroke is a code-first workflow automation and AI agent platform, launched July 13, 2026 by Y Combinator-backed Sprint Labs, that positions itself as an n8n alternative built for AI coding agents. Workflows are written as typed TypeScript in the user's own repository, usually by agents such as Claude Code, Cursor, or Codex, and deployed to Keystroke's managed cloud or self-hosted under the source-available Elastic License 2.0.
Is Keystroke a good n8n alternative?
Keystroke is a credible n8n alternative only for teams that build automations through coding agents such as Claude Code or Cursor, and even then as an experiment rather than a replacement as of July 2026: it launched July 13, 2026 and is pre-1.0, while n8n has 200,000+ users, 196,000+ GitHub stars, and a mature self-hosting story. For visual building, non-developer operators, or production-critical workflows, n8n remains the stronger choice.