n8n is a self-hosted workflow automation tool. Unlike Zapier or Make, you run it on your own server with no per-execution fees.
I've been running n8n automation for years. Here are real automation examples you can build, plus setup tips and best practices.
Why n8n for Automation?
Before the automation examples, let's talk about why you'd choose n8n for your business automation needs:
Cost: No per-execution fees. Run 1,000 or 100,000 workflows per month - same cost (your server).
Privacy: Your data stays on your server. Critical for sensitive business data, GDPR compliance, or healthcare/financial industries.
Flexibility: Full JavaScript/Python access. Build anything you can code.
Control: Self-hosted means you control uptime, updates, and security.
The trade-off: You need technical resources to set up and maintain it.
1. Lead Notification to Slack
Trigger: New form submission (Typeform, Google Forms, or webhook) Action: Send formatted message to Slack channel
[Webhook] → [Format Message] → [Slack]
This is the "hello world" of automation. When someone fills out your contact form, your team gets an instant Slack notification with all the details.
Detailed Setup
- Create a Webhook node as trigger
- Configure your form to POST to the webhook URL
- Add a Slack node, select your workspace and channel
- Map form fields to Slack message blocks
// Format message in a Function node
return [{
json: {
text: `*New Lead* :bell:`,
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: `*Name:* ${$json.name}\n*Email:* ${$json.email}\n*Company:* ${$json.company}\n*Message:* ${$json.message}`
}
}
]
}
}];
Why it matters: No more checking email for leads. Response time drops from hours to minutes.
2. CRM to Accounting Sync
Trigger: Deal marked as won in HubSpot/Pipedrive Action: Create invoice in QuickBooks/Xero
[HubSpot Trigger] → [Get Deal Details] → [Get Contact Info] → [Create QuickBooks Invoice] → [Update HubSpot]
When sales closes a deal, accounting automatically gets an invoice draft. No manual data entry, no missed invoices.
Workflow Details
- HubSpot trigger watches for deal stage changes
- Filter node checks if stage = "Closed Won"
- HTTP Request gets full deal and contact details
- QuickBooks node creates invoice with line items
- HubSpot update stores invoice number on deal record
Bonus: Link the invoice back to the CRM record so sales can see payment status without switching apps.
3. Daily Report Generator
Trigger: Schedule (every day at 8am) Action: Pull data from multiple sources, create summary, send email
[Cron] → [Get Sales Data] → [Get Support Tickets] → [Get Website Stats] → [Merge] → [Format HTML] → [Send Email]
Aggregate yesterday's key metrics from your tools. Sales numbers, support volume, website traffic - all in one email before you've had coffee.
Implementation
// Merge data in Function node
const sales = $items("Sales").json;
const tickets = $items("Tickets").json;
const analytics = $items("Analytics").json;
const html = `
<h2>Daily Report - ${new Date().toDateString()}</h2>
<h3>Sales</h3>
<ul>
<li>New deals: ${sales.newDeals}</li>
<li>Revenue: $${sales.revenue.toLocaleString()}</li>
</ul>
<h3>Support</h3>
<ul>
<li>New tickets: ${tickets.new}</li>
<li>Resolved: ${tickets.resolved}</li>
<li>Avg response time: ${tickets.avgResponseTime}min</li>
</ul>
<h3>Website</h3>
<ul>
<li>Visitors: ${analytics.visitors.toLocaleString()}</li>
<li>Sign-ups: ${analytics.signups}</li>
</ul>
`;
return [{ json: { html, subject: `Daily Report - ${new Date().toDateString()}` }}];
4. Content Publishing Pipeline
Trigger: New row in Google Sheets or Airtable Action: Create social posts, schedule, update status
[Google Sheets] → [Generate Social Copy] → [Post to LinkedIn] → [Post to Twitter] → [Update Sheet Status]
When marketing adds a new blog post to the content calendar, n8n automatically creates and schedules social posts.
Advanced: AI-Generated Variations
[Google Sheets] → [OpenAI: Generate 3 variations] → [Post LinkedIn]
→ [Schedule Twitter (3 posts)]
→ [Update Sheet]
Use the OpenAI node to generate different versions of the social copy. Schedule Twitter posts at different times for better reach.
5. Customer Onboarding Sequence
Trigger: New customer in Stripe Action: Create accounts, send welcome email, notify team
[Stripe Webhook] → [Create User in App] → [Add to Email List] → [Send Welcome Email] → [Notify Slack] → [Log to CRM]
New paying customer? Automatically:
- Create their account in your application
- Add to onboarding email sequence (Mailchimp, ConvertKit, etc.)
- Send personalized welcome email
- Notify customer success team in Slack
- Create contact record in CRM
Error Handling
What if one step fails? Add error handling:
[Stripe Webhook] → [Try: Create User] → [Success: Continue]
→ [Error: Notify Admin + Retry Queue]
Use n8n's error workflow feature to catch failures and alert your team.
6. Support Ticket Escalation
Trigger: Ticket open for 24+ hours without response Action: Escalate and notify
[Cron hourly] → [Get Open Tickets] → [Filter by Age] → [Update Priority] → [Notify Manager]
Check for tickets that haven't been touched. Automatically bump priority and alert the team lead.
Logic Example
// Filter node expression
const now = new Date();
const ticketCreated = new Date($json.created_at);
const hoursOpen = (now - ticketCreated) / (1000 * 60 * 60);
return hoursOpen > 24 && $json.status === 'open' && !$json.assignee;
7. Inventory Low Stock Alert
Trigger: Schedule (hourly) or webhook from inventory system Action: Check stock levels, alert if low
[Cron] → [Get Inventory Levels] → [Filter Low Stock] → [Send Alert Email] → [Create Reorder Task in Asana]
Never run out of stock because someone forgot to check. Get alerts before it's too late.
Multi-Threshold Alerts
[Get Inventory] → [Router]
├── Stock < 10 → [Critical Alert + Auto Reorder]
├── Stock < 50 → [Warning Email]
└── Stock OK → [Skip]
Different actions for different urgency levels.
8. Meeting Notes Distribution
Trigger: New file in Google Drive folder Action: Extract content, summarize, distribute
[Google Drive Trigger] → [Get File Content] → [Summarize with AI] → [Send to Attendees] → [Update Notion]
After a meeting, drop the notes in a folder. n8n summarizes key points and sends to all attendees. Also logs in your knowledge base.
AI Summarization Prompt
Summarize these meeting notes. Include:
1. Key decisions made (bullet points)
2. Action items with owners
3. Topics for follow-up
Keep it under 200 words.
9. Social Media Monitoring
Trigger: Schedule (every 15 minutes) Action: Search for brand mentions, notify and log
[Cron] → [Twitter API Search] → [Deduplicate] → [Sentiment Analysis] → [Route by Sentiment]
├── Negative → [Urgent Slack]
├── Positive → [Log for Social Proof]
└── Neutral → [Skip]
Monitor Twitter for mentions of your brand. Negative mentions get escalated immediately. Positive ones get logged for social proof collection.
Deduplication
Store seen tweet IDs in n8n's built-in database or an external one to avoid processing the same tweet twice.
10. Invoice Payment Reminder
Trigger: Schedule (daily) Action: Check overdue invoices, send reminders
[Cron] → [Get Overdue Invoices] → [Router by Days Overdue]
├── 7 days → [Gentle Reminder]
├── 14 days → [Firm Reminder]
└── 30 days → [Final Notice + Alert Sales]
Automatically send payment reminders at 7, 14, and 30 days overdue. Different tone for each stage. No manual tracking required.
Setting Up n8n for Automation
Option 1: n8n Cloud (Easiest)
n8n offers a hosted automation platform. Good for getting started without infrastructure setup.
- Free tier: 2,500 executions/month
- Paid tiers scale with usage
Option 2: Self-Hosted with Docker (Recommended)
Run n8n on your own server. No usage fees, full control.
Basic setup:
docker run -d \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
Production setup with Docker Compose:
version: '3.8'
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD}
- N8N_HOST=${N8N_HOST}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${N8N_HOST}/
- GENERIC_TIMEZONE=America/Chicago
volumes:
- n8n_data:/home/node/.n8n
- ./local-files:/files
volumes:
n8n_data:
Production Requirements
For production, you'll need:
- SSL certificate: Use Nginx/Caddy as reverse proxy with Let's Encrypt
- Authentication: Basic auth minimum, or integrate with OAuth
- Backups: Regular backup of
/home/node/.n8ndirectory - Monitoring: Track workflow execution success/failure rates
- Updates: Regular n8n version updates for security patches
Security Considerations
# Additional security settings
environment:
- N8N_BLOCK_ENV_ACCESS_IN_NODE=true # Prevent access to env vars in code
- N8N_PERSONALIZATION_ENABLED=false # Disable telemetry
- EXECUTIONS_DATA_PRUNE=true # Auto-delete old execution data
- EXECUTIONS_DATA_MAX_AGE=168 # Keep 7 days (hours)
n8n vs Zapier/Make: Automation Platform Comparison
| Feature | n8n | Zapier | Make |
|---|---|---|---|
| Pricing | Self-hosted: $0 | Per task | Per operation |
| Data privacy | Your server | Their cloud | Their cloud |
| Custom code | Full JavaScript | Limited | Limited |
| Complexity | High | Low | Medium |
| Setup effort | High | Low | Low |
| Integrations | 400+ | 6,000+ | 1,800+ |
| Error handling | Advanced | Basic | Good |
| Learning curve | Steep | Gentle | Moderate |
Detailed comparison: Make vs Zapier - which platform to choose if you're not ready for self-hosted.
When n8n Automation Makes Sense
- Volume: Running 10,000+ automation executions/month (cost savings)
- Privacy: Healthcare, finance, or any data-sensitive automation needs
- Custom logic: Complex conditionals, custom API calls, JavaScript transformations
- Technical team: You have DevOps resources to maintain automation infrastructure
When n8n Automation Doesn't Make Sense
- Small scale: < 1,000 automation runs/month - Zapier/Make free tiers work fine
- No technical resources: Self-hosted automation requires maintenance
- Need specific integrations: n8n has fewer ready-made integrations
- Speed to value: Zapier is faster to set up for simple automations
Common Automation Mistakes
Over-Complicating Automations
Start simple. Get it working. Add complexity later. A working 3-node automation beats a broken 15-node workflow.
No Error Handling
Add error branches. Log failures. Set up alerts when workflows break.
[Main Workflow] → [Error Trigger] → [Log to Database] → [Slack Alert]
Hardcoding Credentials
Use n8n's credential system. Never put API keys directly in workflows. Credentials are encrypted at rest.
No Testing
Test with sample data before connecting to production systems. Use n8n's manual execution feature.
Ignoring Rate Limits
APIs have rate limits. Add delays between requests when processing many items:
// Add delay in Function node
await new Promise(resolve => setTimeout(resolve, 1000)); // 1 second delay
No Version Control
Export workflows as JSON and store in Git. Track changes over time.
Advanced Automation Tips
Automation Organization
- Name automations clearly: "Lead-to-CRM-Sync" not "Workflow 1"
- Add notes to complex nodes explaining what they do
- Group related automations with tags
Performance Optimization
- Use "Execute Once" for single-item triggers
- Batch API calls when possible instead of individual requests
- Set appropriate polling intervals (don't poll every minute if hourly is fine)
Database Node
For complex state management, use n8n's SQLite database or connect to PostgreSQL/MySQL:
- Track processed items to avoid duplicates
- Store configuration data
- Build simple dashboards from workflow data
Sub-Workflows
Break complex workflows into reusable sub-workflows:
[Main Workflow] → [Call: Validate Customer] → [Call: Create Invoice] → [Call: Send Notifications]
Easier to test and maintain.
What's Next
These examples are starting points. Real power comes from combining them:
- Lead notification + CRM sync + onboarding sequence = full customer journey automation
- Support escalation + monitoring = proactive customer success
- Inventory alerts + accounting sync = automated procurement
The limit is your imagination (and your API access).
Need help setting up n8n or building custom workflows? Check out my n8n automation services or workflow automation. I run n8n for multiple businesses and can help you get started. Let's talk.