> ./exec Ai_automation.sh — ARTICLE

10 n8n Workflows Every Mid-Market Business Needs

Niklas — Backend Engineer NiklasAllemagne · Backend Engineer 18-06-2026 6 min read AI-AUTOMATION

Author: Niklas, Backend Engineer

Anyone responsible for IT infrastructure in a company with 50 to 250 employees knows the problem: repetitive processes consume capacity that is badly needed elsewhere. Zapier and Make quickly cost 500 to 2,000 euros per month at moderate volumes, and the data sits on servers you have no control over.

n8n solves both: open-source, self-hosted, with no execution limits. An n8n implementation in a business can be production-ready within a day. The following article presents ten workflows that are regularly used in practice, with concrete configuration details.

Prerequisite: A Production-Ready Base Installation

Before the workflows, the platform must be in place. The recommended approach for mid-market businesses is Docker Compose with a dedicated Postgres instance:

services:
  n8n:
    image: n8nio/n8n:latest
    restart: always
    environment:
      - N8N_HOST=automation.example.de
      - N8N_PROTOCOL=https
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=336
    volumes:
      - n8n_data:/home/node/.n8n

Always run the production system behind a reverse proxy with TLS. On Hetzner this is set up in under two hours. Self-hosted n8n has no limit on execution frequency, which can become expensive quickly with SaaS providers that charge extra for high-frequency scheduling.[1]

Workflow 1: Lead Qualification from Contact Forms

Contact inquiries arrive by email, are evaluated manually, and are frequently forwarded too late. A webhook receives the form data, an HTTP node fetches company data, and an IF node checks whether the lead qualifies. Qualified leads go directly into the CRM and a dedicated Slack channel.

{
  "conditions": {
    "number": [
      {
        "value1": "={{ $json.company_size }}",
        "operation": "largerEqual",
        "value2": 50
      }
    ]
  }
}

Time saved: 3 to 5 hours per week in inside sales.

Workflow 2: IT Helpdesk Ticket Routing

Support emails go to a shared address; manual assignment costs time every day. An email trigger reads incoming messages, a code node classifies the request using regex, the ticket is created via API in Jira or Plane, and assigned to the right technician.

const subject = $input.first().json.subject.toLowerCase();
let category = 'general';
if (subject.includes('drucker') || subject.includes('monitor')) {
  category = 'hardware';
} else if (subject.includes('vpn') || subject.includes('netzwerk')) {
  category = 'network';
} else if (subject.includes('passwort') || subject.includes('zugang')) {
  category = 'access';
}
return [{ json: { ...$input.first().json, category } }];

Workflow 3: Automated Invoice Processing

Incoming PDF invoices are manually reviewed, coded, and transferred to the ERP. The workflow extracts the email attachment, sends it to an OCR API (Mindee or self-hosted Tesseract), validates the recognized fields (invoice number, amount, IBAN), and transfers the record to the ERP via API call. Deviations above a configurable threshold route the invoice to a review queue rather than failing silently. Companies with 200 invoices per month typically save 15 to 20 working hours this way.[2]

Workflow 4: Employee Onboarding

A new hire means manually setting up eight systems: email, VPN, Active Directory, Slack, CRM, Jira, licenses, access cards. The HR system (Personio, HRworks) sends a webhook event as soon as a new employee is created. n8n sequentially creates all accounts, sets group memberships, and sends the line manager a checklist with action items. Error handling via a Try-Catch node ensures no step fails silently. Onboarding time drops from 4 hours to under 20 minutes.

Workflow 5: Server Monitoring and Alerting

Critical services go down and the team only finds out through user complaints. A schedule trigger fires every 3 minutes, an HTTP node checks endpoints via GET, and an IF node evaluates the status codes. On failure: an entry is written to Postgres and a notification is sent via Teams or Slack. After 15 minutes without recovery, another trigger escalates via email to the on-call team.

# Environment variables for the monitoring workflow
MONITORED_ENDPOINTS=https://api.example.de/health,https://shop.example.de/ping
ALERT_THRESHOLD_SECONDS=180
ESCALATION_CONTACT=it-oncall@example.de

No SaaS provider allows this minute-level polling cadence on an entry-level plan without additional charges.

Workflow 6: Email Triage with AI Classification

The kontakt@ inbox receives dozens of emails every day across widely different categories. Each incoming email is forwarded to an HTTP node that calls a local AI API (Ollama with a small model) or the Claude API. The response contains category and priority. n8n sets labels in Microsoft 365, creates a ticket when needed, and sends an acknowledgment to the sender. Classification accuracy, based on experience, exceeds 91 percent after two weeks of fine-tuning.

Workflow 7: Weekly KPI Report

The Monday morning report for management is compiled manually from three sources by one person. A schedule trigger fires every Friday at 5 PM, pulling data from the CRM, ERP, and analytics API. A code node calculates week-over-week deltas, an HTML node renders the table, and a sendmail node dispatches the report.

# Code Node (Python runtime, suitable for simple arithmetic only)
current = _input.all()[0].json['revenue']
previous = _input.all()[0].json['revenue_prev_week']
delta = round((current - previous) / previous * 100, 2)
return [{'json': {'delta_percent': delta, 'current': current}}]

Workflow 8: ERP Data Synchronization

Customer data exists redundantly in the CRM and ERP; inconsistencies lead to errors in orders. A schedule trigger fires every 15 minutes, a GET request hits the CRM API, a Merge node compares the result with the ERP record, and any deviation triggers a PATCH request to the ERP. A dedicated conflict branch logs irresolvable conflicts for manual review. Ensuring idempotency: n8n provides execution IDs and the Wait node to detect duplicate runs.

Workflow 9: GDPR Compliance Check for New Software

Business units independently procure SaaS services without a data protection review. An internal self-service form submits requests via webhook. n8n automatically checks: Is the vendor EU-based? Is a data processing agreement in place? Is the service on the internal whitelist? The result goes to the data protection officer and simultaneously to the requester. Rejections always include an alternative suggestion. Processing time drops from 5 to 7 business days to under 24 hours.

Workflow 10: Backup Status Report

Backups are supposedly running, but nobody knows for certain whether they are succeeding. Backup scripts on the servers write status JSON to a shared Postgres table:

CREATE TABLE backup_status (
  host        VARCHAR(100),
  job         VARCHAR(100),
  finished_at TIMESTAMPTZ,
  size_bytes  BIGINT,
  success     BOOLEAN
);

n8n reads this table early every morning, compares timestamps and file sizes against configurable thresholds, and sends a consolidated status report. Missing or outdated backups trigger an immediate escalation rather than waiting until a real incident occurs.

n8n Implementation in Your Business: The Three Most Common Mistakes

An n8n implementation rarely fails because of the technology. The most common mistakes are avoidable.

Deploying workflows to production without error handling is the most frequent one. Every workflow needs an Error Trigger node that writes failures to a central table and raises an alert. No workflow should ever fail silently.

Hard-coding credentials directly in workflow nodes instead of using n8n's Credentials Manager is a security risk and prevents reliable teamwork. All credentials belong in the encrypted Credentials Store.

Missing version control is the third issue. n8n has offered workflow history since version 1.0, but exporting to Git via the n8n CLI is a production-readiness requirement:

n8n export:workflow --all --output=./workflows/
git add workflows/ && git commit -m "chore: export workflows $(date +%Y-%m-%d)"

Anyone who addresses these three points from the start will have a maintainable automation platform after six months, with no dependency on any single external vendor.

Sources

[1] n8n GmbH: "Pricing and Fair Use", https://n8n.io/pricing/, accessed June 2026

[2] Bitkom e.V.: "Digitalisierung im Mittelstand 2024", https://www.bitkom.org/Presse/Presseinformation/Digitalisierung-Mittelstand-2024, Berlin 2024

[3] n8n GmbH: "Code Node: Python", https://docs.n8n.io/code/code-node/python/, accessed June 2026

[4] Fraunhofer IPA: "Automatisierungspotenziale in KMU", https://www.ipa.fraunhofer.de/automatisierung-kmu, Stuttgart 2023

Niklas — Backend Engineer

NiklasAllemagne

Backend Engineer

APIs, n8n integration, FastAPI, Python, automation.

Need help with Ai & Automation?

Free initial consultation, fixed price after audit.

INIT_CONSULTATION() →