Maenda MediaMaenda Media
Network
HostingDomainsRadioVPS
Maenda Media

Hosting since 2003. Web hosting, VPS servers and streaming from our own datacenter in Meppel. Dutch support on weekdays.

iDEAL
Visa
Mastercard
Bancontact
SEPA

Products

  • Web Hosting
  • VPS Servers
  • Managed VPS
  • Radio Streaming
  • Video Streaming
  • Stream monitoring
  • Domains
  • Spam Filtering

Support

  • Contact
  • Knowledge Base
  • Server Status

Company

  • About Us
  • Network Info

Contact

  • hallo@maenda.media
  • Nederland

© 2026 Maenda Media. All rights reserved.

Privacy PolicyTerms of ServiceCookie PolicyGDPR
Knowledge BaseVPS ApplicationsBuilding n8n Workflows — User Guide
Back to Knowledge Base
VPS Applications

Building n8n Workflows — User Guide

Published on February 15, 20267 min read

Table of Contents

  • The n8n Interface
  • Your First Workflow
  • Step 1: Create a new workflow
  • Step 2: Set up the trigger
  • Step 3: Add nodes
  • Step 4: Test and activate
  • Commonly Used Nodes
  • Triggers
  • Data & Logic
  • Communication
  • Data Storage
  • AI Workflows with LangChain
  • AI Nodes Overview
  • Example: AI Customer Service Agent
  • Multi-Agent Workflows
  • Writing Custom Code
  • JavaScript Example
  • Python Example
  • Managing Credentials
  • Organizing Workflows
  • Tags
  • Folders
  • Versioning
  • Error Handling
  • Error Trigger
  • Try/Catch Pattern
  • Retry Logic
  • Useful Tips
  • More Information

This guide walks you through using n8n to build powerful automation workflows step by step. From simple tasks to complex AI-driven processes.


The n8n Interface

After logging into your n8n installation, you'll see the dashboard with an overview of all your workflows.

n8n workflow editor — visual drag-and-drop interfacen8n workflow editor — visual drag-and-drop interface

The interface consists of:

ComponentDescription
CanvasThe central workspace where you place and connect nodes
Node PanelLeft panel with all available nodes and integrations
ToolbarTop bar with options to test, activate, and save
Execution LogBottom right for viewing previous executions
SettingsWorkflow settings like name, tags, and error handling

Your First Workflow

Let's build a simple workflow that sends a weather report email every morning.

Step 1: Create a new workflow

  1. Click "+ New Workflow" in the top right
  2. Name your workflow, e.g., "Daily Weather Report"
  3. You start on an empty canvas with a trigger node

Step 2: Set up the trigger

The trigger determines when your workflow starts:

  • Schedule Trigger — At fixed times (e.g., every day at 07:00)
  • Webhook — When a URL is called
  • Event-based — On an app event (e.g., new email)

For our weather report, we choose Schedule Trigger:

Trigger: Schedule
Rule: Every day at 07:00
Timezone: Europe/Amsterdam

Step 3: Add nodes

  1. Click the + icon to the right of the trigger
  2. Search for "HTTP Request" in the node panel
  3. Configure the node:
Method: GET
URL: https://api.openweathermap.org/data/2.5/weather
Query Parameters:
  q: Amsterdam
  appid: your-api-key
  units: metric
  lang: en
  1. Add a "Send Email" node after the HTTP Request
  2. Connect the HTTP Request output to the Email node

Step 4: Test and activate

  1. Click "Test Workflow" to run the workflow manually
  2. Check the output of each node in the execution log
  3. When everything works, click the "Active" toggle to enable the workflow

Commonly Used Nodes

Here are the nodes you'll use most frequently:

Triggers

NodeUsage
Schedule TriggerRun workflows at fixed times
WebhookStart workflows via HTTP request
Email Trigger (IMAP)React to incoming emails
CronAdvanced schedules with cron expressions

Data & Logic

NodeUsage
IFConditional logic (if/then)
SwitchMultiple paths based on value
MergeCombine data from multiple sources
SetAdd or modify fields
CodeCustom JavaScript or Python code
Split In BatchesProcess large datasets in parts

Communication

NodeUsage
Send EmailSend emails via SMTP
SlackMessages to Slack channels
TelegramMessages via Telegram bot
DiscordMessages to Discord servers

Data Storage

NodeUsage
Google SheetsRead/write to spreadsheets
AirtableDatabase-like storage
PostgreSQLExecute SQL queries directly
MySQLMySQL database operations

AI Workflows with LangChain

n8n has built-in AI capabilities via LangChain integration. Build AI agents that autonomously execute tasks.

AI Agent workflow in n8n with LangChain nodesAI Agent workflow in n8n with LangChain nodes

AI Nodes Overview

Available AI nodes in the n8n panelAvailable AI nodes in the n8n panel

The key AI nodes:

NodeFunction
AI AgentAutonomous agent that can use tools
Basic LLM ChainSimple prompt → response chain
Conversational AgentAgent with conversation memory
OpenAI Chat ModelGPT-4, GPT-3.5 models
Anthropic Chat ModelClaude models
Vector StoreStorage for embeddings (RAG)
Text SplitterSplit documents for embeddings

Example: AI Customer Service Agent

Here we build an AI agent that answers customer questions based on your knowledge base:

AI Agent configuration with tools and memoryAI Agent configuration with tools and memory

Workflow setup:

  1. Webhook Trigger — Receives customer questions via API
  2. AI Agent — Processes the question with:
    • Chat Model: OpenAI GPT-4 or Anthropic Claude
    • Memory: Window Buffer Memory (remembers last 10 messages)
    • Tools:
      • Vector Store Tool — Searches your knowledge base
      • HTTP Request Tool — Fetches live product info
      • Calculator — For price calculations
  3. Respond to Webhook — Returns the answer
System Prompt:
"You are a customer service representative for [company].
Answer questions based on the knowledge base.
Be friendly and professional.
If you don't know the answer, refer to support@company.com."

Multi-Agent Workflows

For more complex scenarios, combine multiple AI agents:

Multi-agent workflow exampleMulti-agent workflow example

Examples:

  • Content Pipeline: Agent 1 (research) → Agent 2 (writing) → Agent 3 (review)
  • Data Analysis: Agent 1 (data fetching) → Agent 2 (analysis) → Agent 3 (report)
  • Customer Service: Router Agent → Specialist Agent (technical/billing/general)

Writing Custom Code

With the Code node, you can run JavaScript or Python for complex logic:

JavaScript Example

// Filter and transform all items
const results = items.map(item => {
  const data = item.json;
  return {
    json: {
      name: data.firstName + ' ' + data.lastName,
      email: data.email.toLowerCase(),
      isActive: data.lastLogin > Date.now() - 30 * 24 * 60 * 60 * 1000,
      label: data.totalOrders > 10 ? 'VIP' : 'Standard'
    }
  };
});

return results;

Python Example

# Data analysis with Python
import json
from datetime import datetime

results = []
for item in items:
    data = item['json']
    # Calculate age in days
    created = datetime.fromisoformat(data['createdAt'])
    age_days = (datetime.now() - created).days
    
    results.append({
        'json': {
            'id': data['id'],
            'age_days': age_days,
            'status': 'new' if age_days < 30 else 'existing'
        }
    })

return results

Managing Credentials

Credentials (API keys, passwords) are securely stored in n8n:

  1. Go to Settings → Credentials
  2. Click "+ Add Credential"
  3. Choose the type (e.g., OpenAI API, Gmail OAuth, Slack Bot)
  4. Fill in the required details
  5. Click "Save"

Security tips:

  • Credentials are encrypted in the database
  • Use environment variables for sensitive values
  • Create separate credentials per environment (test/production)
  • Limit API keys to only the required permissions

Organizing Workflows

Tags

Use tags to categorize workflows:

  • production — Active, tested workflows
  • development — Workflows in development
  • marketing — Marketing automation
  • finance — Financial processes

Folders

Organize workflows in folders by department or project.

Versioning

n8n supports workflow versioning:

  • Each save creates a new version
  • You can revert to previous versions
  • Export workflows as JSON for version control in Git
# Export workflow as JSON backup
curl -X GET https://your-n8n.com/api/v1/workflows/WORKFLOW_ID \
  -H "X-N8N-API-KEY: your-api-key" \
  -o workflow-backup.json

Error Handling

Make your workflows robust with proper error handling:

Error Trigger

Create a separate workflow that starts on errors:

  1. Use the Error Trigger node
  2. Send a notification via Slack/email on errors
  3. Log error details to a spreadsheet

Try/Catch Pattern

  1. Add an IF node after a risky operation
  2. Check for successful output
  3. Route errors to an alternative path

Retry Logic

For API nodes, you can set up automatic retries:

Retry On Fail: Enabled
Max Tries: 3
Wait Between Tries: 1000ms

Useful Tips

  1. Sticky Notes — Add notes to your canvas to document workflows
  2. Sub-workflows — Split complex workflows into smaller, reusable parts
  3. Expressions — Use {{ $json.field }} to dynamically reference data
  4. Pinned Data — Pin test data for consistent testing
  5. Keyboard shortcuts:
    • Ctrl+S — Save
    • Ctrl+Enter — Run test
    • Tab — Open node panel
    • Ctrl+Shift+E — Open execution log
  6. Webhook URLs — In production, always use the Production URL, not the test URL
  7. Rate Limiting — Add Wait nodes between API calls to respect rate limits

More Information

  • n8n Documentation: docs.n8n.io
  • Community Forum: community.n8n.io
  • Workflow Templates: n8n.io/workflows
  • LangChain in n8n: docs.n8n.io/langchain

Need help building a specific workflow? Contact our support team via the chat window at the bottom right or send an email to support@maenda.media.

VPS is temporarily sold out

Our cluster is full, so no new servers can be added for now. Leave your details and you will be the first to hear when capacity is available.

VPS Applications

Related Articles

More articles from this category

Still have questions?

Our support team is happy to help you

Installing n8n on your VPS — Complete Guide

What is n8n? n8n is a powerful open-source workflow automation platform — similar to Zapier or Make, but self-hosted on ...

4 min readRead article

Installing OpenClaw on Your VPS — Complete Guide

Installing OpenClaw on Your VPS — Complete Guide OpenClaw is an open-source AI assistant that runs on your own server. Y...

6 min readRead article

Using OpenClaw — User Guide

Using OpenClaw — User Guide This guide shows you how to get the most out of OpenClaw. From daily use to advanced configu...

6 min readRead article