Automate Your Work With AI: n8n Workflows on a Small VPS

Part 10 of the AI series. The ideas here work with an outside model or a local one, so they suit almost any plan size. Local models are set up in part 3.

A chatbot waits for you to type. Automation does the work while you are asleep: an email arrives, a form is submitted, a recording lands in a folder, and a chain of steps runs by itself. Adding a language model to that chain gives the automation something it never had before, the ability to read ordinary text and make a sensible decision about it. This guide shows how to run a workflow tool on a small VPS, eight things worth automating, and the rules that keep an automated AI from causing trouble.

VPS plans for a workflow server (2 GB and up)

In stock when this page loaded. See all 12 matching plans

What is in this guide

What a workflow tool does

A workflow tool lets you draw a flowchart that runs by itself. Each box is a step: a trigger (a schedule, a web request, a new email), an action (fetch a page, write a file, send a message) or a decision. n8n is a popular open-source choice that can be run on your own server, with a visual editor and hundreds of ready-made connections. It also has AI steps that call a language model, so "read this and decide" becomes just another box.

A note on licensing: n8n is free to self-host, but its licence is not the standard open-source kind, and it has limits on commercial use such as reselling it. Read the licence if you plan to run it for clients.

Setting up n8n

With Docker installed (see the Docker guide), a minimal setup is a folder with a compose.yaml:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: unless-stopped
    ports:
      - "127.0.0.1:5678:5678"
    environment:
      - GENERIC_TIMEZONE=Australia/Brisbane
      - TZ=Australia/Brisbane
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:

Change the time zone to yours, because schedules depend on it. Start it with docker compose up -d, then reach it through an SSH tunnel as in part 3 (forward port 5678) and open it at http://localhost:5678. The first visit asks you to create the owner account.

The port is bound to 127.0.0.1, so nothing is open to the internet. Some triggers, such as a web form calling your workflow, need a public address. Put a reverse proxy with HTTPS in front, tell n8n its public address with the WEBHOOK_URL setting, and publish only what you need. Also back up the n8n_data volume, because your workflows and saved logins live there.

Connecting a model

  • A local model: add an Ollama credential in n8n that points at your Ollama server. If both run in the same Docker network, the address is the service name, such as http://ollama:11434. Otherwise use your server's private address. Keep Ollama off the internet.
  • An outside model: add a credential with your own key and a spending limit set at the provider.

n8n's AI nodes (names change between versions, so look for the "AI" or "LangChain" section) include a basic chain that sends a prompt and returns text, and agent nodes that can call tools. Start with the basic chain, which is predictable and cheap. Model names and node names will differ in your version, so use the editor's own search.

1. A morning digest

The flow. A schedule fires at 7 am, fetches a few news feeds or your own stats, sends the text to the model with "summarise the key points in ten lines", and emails or messages you the result.

Why it works. One short request a day is cheap and slow is fine. A local 3B model manages summaries well.

Watch out for. Summaries can drop the one item that mattered, so include links to the originals.

2. Email triage

The flow. A trigger watches a mailbox. For each new message the model picks one label from a fixed list (billing, support, sales, newsletter, spam), and the workflow moves the message to a folder or posts a notification for the urgent ones.

Why it works. Classifying short text is a job small models do well, and the label list keeps the output simple.

Watch out for. Test it on fifty old emails first and count the mistakes. Use it to sort and flag, never to delete or reply. Treat incoming text as untrusted, because a message can contain instructions aimed at your model.

3. Voice notes into tidy notes

The flow. A recording is sent to the server, a speech-to-text step turns it into a transcript, the model produces a title, a summary and a task list, and the workflow saves a text file or adds it to your notes system.

Why it works. Speech recognition and small language models both run on a CPU, one after the other. See the 4 GB guide for the speech side.

Watch out for. Make the steps run in sequence so memory is freed in between, and read the task list before relying on it.

4. Contact form assistant

The flow. Your website's contact form calls a workflow. The model checks whether it is spam, picks a category and drafts a reply. Real messages are sent to you with the draft attached, for approval.

Why it works. You save the first read and the first draft, and you still decide what is sent.

Watch out for. Never send the model's reply to a customer automatically. Protect the web address with a secret token that the form must include, and add a limit on how often it can be called.

5. Receipts into a spreadsheet

The flow. Photos or PDFs arrive in a folder or by email. OCR turns them into text, the model returns the date, supplier and total as JSON, and the workflow appends a row to a spreadsheet or file.

Why it works. Extraction has a narrow job and a fixed shape of answer, so it is accurate enough to save hours.

Watch out for. Validate the JSON before saving it, send anything odd to a review list, and keep the original file. Check totals for anything used in your tax records.

6. A monitoring translator

The flow. When an uptime check fails or a disk is nearly full, the workflow collects the last few log lines, asks the model "explain this in plain English and suggest what to check", and sends you the explanation along with the raw lines.

Why it works. It turns an alarming alert into a first diagnosis at 3 am.

Watch out for. Logs can contain passwords, tokens and personal data, so use a local model, or strip anything sensitive before sending it elsewhere. Treat the suggestion as a hint to check, never as a command to run.

7. Content drafts for review

The flow. When you add a new product or article, the workflow drafts a short description, social post or summary, and puts it in a "needs review" list.

Why it works. Rewriting your own material is a strength of mid-size models, and you remain the editor.

Watch out for. Generic wording and invented details. Read everything before it is published, and give the model your facts in the prompt so it does not have to guess.

8. Feedback and review sorting

The flow. New reviews, survey answers or support tickets are tagged with a topic and a mood (positive, neutral, negative), and a weekly summary shows the recurring complaints.

Why it works. Sorting many short pieces of text is slow for people and easy for a model. A weekly report of themes is very valuable.

Watch out for. Sentiment is unreliable with sarcasm and mixed messages. Read a sample of each tag to be sure it means what you think.

Rules for safe AI automation

  1. A human approves anything that leaves the building. Drafts, not sends. Flags, not deletions.
  2. Ask for structured answers (a single label, or JSON), and check them in a later step. If the answer is not valid, send the item to a review list.
  3. Keep the temperature low for sorting and extraction, so the model gives the same answer to the same input.
  4. Set limits. Cap runs per hour, and cap spending at outside providers. A loop can cost real money overnight.
  5. Treat input text as hostile. Emails, forms and web pages can contain instructions for your model. Never let the model's output decide something dangerous.
  6. Give each workflow only the access it needs. A separate login or API key for each, with the smallest permissions.
  7. Log what happened, including the input and the model's answer, so you can find out why it did something.
  8. Handle errors. Set up an error workflow that tells you when something fails, instead of failing silently.
  9. Test on copies. Run on a sample before pointing it at your real mailbox.
  10. Keep secrets out of prompts. Do not send passwords or private keys to a model, local or not.

A word on agents

An agent is a workflow where the model decides which tool to use next, rather than following your flowchart. They are exciting and unreliable, especially with small models, which often pick the wrong tool, loop, or misread a result. If you try one, give it read-only tools first, run it on a copy of any data, keep it away from anything that sends, spends or deletes, and watch what it does. A fixed flowchart with one AI step is almost always the better choice on a small server.

Which plan do you need?

  • 2 GB: n8n with an outside model, or very small local ones. n8n itself needs around half a gigabyte.
  • 4 GB: n8n plus a 1-3B local model, running one job at a time.
  • 8 GB: n8n plus a 7-8B model and a speech model, taking turns.
  • A dedicated server: several workflows at once, large batches, and bigger models. See the dedicated server AI guide.

4 to 8 GB plans for workflows plus a local model

In stock when this page loaded. See all 9 matching plans

For more, see the cheapest plans and the sales page.

More RackNerd guides