Building AI Workflows with n8n: Design for Running on a VPS
How to set up a tool that lets you build AI-powered automation flows on screen when it runs around the clock on a VPS, and what to watch out for when you leave it running.

Ren

Procura
Why put it on a VPS
- It can run automatically at set times or when triggered by notifications from outside
- You don't have to keep your own PC turned on
- You can manage several automations together on one machine

Ren

Procura
Cautions for leaving it running
The better an automation works, the less you go and look at it. If a flow includes steps that call an AI, things like running more often than expected and driving up costs, or suddenly starting to fail because of a change on the external service's side, won't be noticed unless you look at the logs. Don't consider it done after the initial setup; build in checks that assume it keeps running.
- Record success or failure on every run
- Set it up so you get a notification if failures continue
- For flows that call an API many times in one run, also set a limit on the number of calls
Handling secrets
In any automation flow there will be places where you set keys or passwords for connecting to external services. If you write them in plain text inside the workflow, they leak as they are if someone sees the screen. Many tools have a feature for managing secrets separately, so always use that.
- Put keys and passwords in the dedicated management feature (don't write them directly in the workflow)
- Minimize the permissions used (don't use a key with write access for a step that only reads)
- Disable keys you no longer use instead of leaving them lying around

Procura
Ren
Procura
Don't be at the mercy of changes on the external service side
The external services your automations call may change their specifications regardless of your convenience. Even small changes, like a field name on a screen changing or the response format shifting slightly, can easily stop an automation that was built assuming a fixed format. Keep in mind that the more flows use a given integration, the wider the impact of a change.
- Read the external service's announcements and update information regularly
- Keep logs so you can quickly identify which integration caused the problem when something stops working

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.