Affordable Automation with n8n

Discover how to install and use n8n, the open-source automation tool that rivals Zapier and Make.com. This step-by-step guide shows you how to set it up locally using Docker, keep it updated, and unlock its potential to streamline your workflows.

Affordable Automation with n8n

Welcome to the first article in my series, where I’ll guide you through step-by-step processes to implement significant business changes quickly and affordably. My goal is to provide solutions that are accessible even for businesses with little to no prior experience with software. These changes come with minimal upfront costs and no long-term contracts, allowing you to explore automation at your own pace.

This blog will offer a mix of free and subscription-based content. Since this is the first post, it’s free for everyone to read. However, I encourage you to consider signing up for either a free or paid subscription to access future content.

In this walkthrough, we’ll focus on n8n, an open-source alternative to platforms like Zapier and Make.com. While Zapier and Make.com are powerful tools, their pricing structures can be complex, and costs can become a barrier to further exploration. n8n offers a more affordable, flexible solution, especially for those willing to get a bit hands-on.

Although n8n has a paid version, we’ll stick to the free, self-hosted option in this tutorial. Let’s dive into why I recommend n8n and how you can get started.

AI-Powered Insights - What is Opensource

Open source refers to software that's freely available for anyone to use, modify, and share. Unlike closed software, where the code is kept secret, open source allows its "blueprints" (called source code) to be visible to everyone. This encourages collaboration, as people worldwide can contribute to improve it, fix bugs, or add features. Open source is like a recipe you can tweak to suit your taste, rather than being stuck with a pre-made dish. Popular examples include Linux, Firefox, and WordPress. It's built on the idea of sharing and transparency, helping technology grow faster and more accessible for everyone.

Why I like n8n

I’m a fan of n8n because it provides greater flexibility and creativity when designing automation solutions. It’s slightly more technical than other platforms, but this is a strength—it allows you to create robust systems tailored to your specific needs.

Another reason to love n8n is its commitment to innovation. The platform regularly releases updates to enhance usability and functionality. While the interface might seem challenging at first, it becomes second nature with use.

Later in this series, I’ll cover other automation tools and alternatives, but for now, let’s get started with n8n.

How to Install n8n Locally

We’ll use Docker Desktop to install n8n. Docker creates a self-contained environment, so the installation won’t interfere with other applications on your computer.

Step 1: Install Docker Desktop

First, download Docker Desktop and follow the installation instructions for your operating system:

Once installed, Docker will manage the software and its dependencies.

ℹ️
Note: You can also install n8n with npm.

Open your Terminal (on Mac) or Command Prompt (on Windows) and run the following commands to set up n8n with a SQLite database (a lightweight database suitable for local use).

Command 1: Create Data Storage

docker volume create n8n_data

This creates a storage space for n8n’s data. It’s important to note this for future updates, as you’ll need to reference it when upgrading.

Command 2: Run n8n in Docker

docker run -d \
  --restart unless-stopped \
  --name n8n \
  -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

This command launches the n8n application. It’s set to restart automatically whenever your computer restarts, ensuring the service is always running.

After the installation, access n8n by visiting http://localhost:5678 in your browser.

ℹ️
Note: Since this is a local installation, webhooks won’t work unless additional steps are taken. I run my n8n instance on a server to enable webhook functionality. If you’re interested in this, feel free to reach out.

Updating n8n

n8n frequently releases updates to enhance its features. When an update is available, you’ll see a notification in the dashboard.

n8n informing of update

Here’s how to update n8n in Docker:

Command 1: List Running Containers

docker ps -a

Identify your n8n container’s ID from the list, the image below show where you can find that.

Example of the output of a docker ps -a command

Command 2: Stop the Container

docker stop [container_id]

Replace [container_id] which the container number from your docker ps -a command.

Command 3: Remove the Container

docker rm [container_id]

Don’t worry—your data is safe! It remains in the SQLite database created earlier.

Command 3: Remove the Container

Use the same command you used to install n8n earlier. This will reconnect the updated container to your existing data.

docker run -d \
  --restart unless-stopped \
  --name n8n \
  -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

That's it. You've now got the instructions on not only how to install n8n locally but also how to keep it updated with the latest improvements and new connections.

Next will look at some practical use cases for n8n.

Practical Use Cases for n8n

n8n offers a range of templates for you to explore, some of which are paid. From what I understand, a significant portion of the revenue from paid templates goes directly to the creators of the automations. While I won’t be covering templates in this article, I encourage you to check them out and see what’s available.

Use case 1 - Getting RSS Feed Update and have OpenAI give a summary of the article

Example flow in n8n

This workflow checks an RSS feed for new articles, generates a five-point summary using OpenAI, and sends the summary to a Telegram group.

You can customise it further to send data to Google Sheets, Slack, email, or other tools.

Example of the RSS Feed Trigger node in n8n
Example of the OpenAI node in n8n
Example of the Telegram node in n8n
Example of the message in Telegram

Use case 2 - Publishing articles from Ghost CMS to LinkedIn

This workflow publishes articles from Ghost CMS to LinkedIn, including an OpenAI-generated summary as the call-out text. It also sends a Telegram notification when the post goes live.

If you’re interested in setting up Ghost CMS (an open-source content management system that supports payments via Stripe), let me know—I’d be happy to help!

The workflow that will publish articles to LinkedIn and notify via telegram than it has been done

Conclusions

n8n is a powerful automation tool that lowers the barriers to entry for AI and workflow automation. It saves time, fosters innovation, and empowers businesses to explore AI without breaking the bank.

In future articles, I’ll demonstrate how to run AI models locally on your computer for free inference and explore additional use cases for n8n.

If you found this guide helpful, please consider supporting the blog with a one-off payment to keep the content coming. Thanks for reading, and see you in the next post!