Automating Daily Tasks with n8n

automation productivity devops

If you’ve ever wished you could connect your apps without writing custom integration code, workflow automation tools are your answer. Today I’m looking at n8n—an open-source alternative to Zapier and Make (formerly Integromat) that you can self-host.

What is n8n?

n8n (pronounced “nodemation”) is a node-based workflow automation tool. You create workflows by connecting nodes, where each node represents an action: trigger on webhook, fetch data from API, transform data, send email, post to Slack, etc.

Key differentiators:

Getting Started

The fastest way to try n8n is with Docker:

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  n8nio/n8n

Open http://localhost:5678 and you’re ready to build workflows.

Your First Workflow

Let’s create a simple workflow: when a webhook receives a POST request, format the data and send it to Slack.

Step 1: Add a Webhook Trigger

  1. Click “Add first step” → Search for “Webhook”
  2. Select “Webhook” node
  3. Set HTTP Method to POST
  4. Copy the test URL

Step 2: Format the Data

  1. Add a new node after Webhook
  2. Search for “Set” (or use “Code” for JavaScript)
  3. Configure the fields you want to extract/transform
// Using the Code node for custom logic
return {
  json: {
    message: `New submission from ${items[0].json.body.name}`,
    email: items[0].json.body.email,
    timestamp: new Date().toISOString()
  }
};

Step 3: Send to Slack

  1. Add “Slack” node
  2. Configure credentials (OAuth or webhook URL)
  3. Select channel and format message

Step 4: Activate

Save the workflow and toggle it to Active. Now every POST to your webhook URL triggers the Slack notification.

Common Use Cases

Developer Workflows

GitHub → CI/CD → Notifications:

Monitoring Alerts:

Automated Backups:

Product/Marketing Workflows

Form Submissions:

Social Media Monitoring:

Data Pipelines

API Synchronization:

Spreadsheet Automation:

Key Nodes to Know

Triggers:

Actions:

Integrations:

Advanced Features

Expressions

n8n uses a templating system for referencing data from previous nodes:

// Reference data from previous node
{{ $node["Webhook"].json.body.email }}

// Access all items
{{ $json.fieldName }}

// Use JavaScript expressions  
{{ $json.amount * 1.1 }}

// Date formatting
{{ $now.format('YYYY-MM-DD') }}

Error Handling

Create robust workflows with error handling:

// Use Error Trigger node for global error handling
// Use Try/Catch pattern with IF nodes
// Set up notifications for failed workflows

Sub-Workflows

Break complex workflows into reusable sub-workflows:

// Main workflow calls sub-workflow
// Sub-workflow can be reused across multiple main workflows
// Great for shared logic like data validation, formatting

Self-Hosting Considerations

For production use, you’ll want:

Database: Use PostgreSQL instead of SQLite

docker run -d \
  --name n8n \
  -p 5678:5678 \
  -e DB_TYPE=postgresdb \
  -e DB_POSTGRESDB_HOST=postgres \
  -e DB_POSTGRESDB_DATABASE=n8n \
  n8nio/n8n

Reverse Proxy: Put nginx/Caddy in front for HTTPS

Persistence: Mount data volumes for durability

Scaling: For high volume, run multiple workers

n8n vs Alternatives

vs Zapier:

vs Make (Integromat):

vs Custom Scripts:

When to Use n8n

Perfect for:

Consider alternatives when:

Final Thoughts

n8n hits a sweet spot: powerful enough for complex workflows, accessible enough for non-developers, and open-source enough that you’re not locked into a SaaS pricing model.

Start with a simple pain point—something you do manually that should be automated—and build from there. Once you get comfortable with the node-based model, you’ll find automation opportunities everywhere.


Automate the boring stuff. Focus on what matters.

All posts