n8n Tutorial: Using the AI agent framework on your own server

With the popular automation solution n8n, you can easily automate your workflows using AI agents and many tool connectors. Our tutorial shows you how to install n8n on your own computer or server.

What is n8n?

n8n is a highly hyped no-code workflow automation tool that supports AI agent workflows. Many companies and AI specialists use the Berlin-based solution to automate processes such as marketing posts, article creation, data enrichment and even internal company processes. But completely different processes are also possible. The solution is roughly comparable to the tools make.com, Zapier, AutoGen Studio or Microsoft Power Automate.

Website: n8n

n8n in Aktion
n8n in action

An example of a possible workflow from the sales area for craft businesses:

  • A potential prospect downloads a document from the tradesman’s website, e.g. a reference presentation
  • The n8n workflow automatically searches for information about the user’s company and industry on the Internet
  • This information is summarized by AI and stored in the CRM.
  • The interested party receives an email with ideas that exactly match their industry (e.g. counters for cafés)
  • An automatic message is then sent via Teams or Slack to the sales representative of the craftsman’s business
  • The message contains AI-generated, suitable points of contact to help the sales guy in convincing the new customer 

These workflows save companies valuable time and improve sales, enabling time savings and new orders.

What are the advantages of n8n?

The special thing about n8n is that you can host n8n both as a cloud solution (from €20/month) and free of charge on your own computer or server. You need some IT skills for this, as you can’t simply download the solution via an installer, but start it from a Docker container. This means that data protection is also well supported for companies.

The key benefits at a glance:

  • Many connectors: There are currently already 800 connections to various tools and systems available, such as LinkedIn, Google Search, WhatsApp, Google Ads API, databases (mySQL, PostgreSQL), cloud systems such as Google Cloud and AWS, BigQuery, enterprise solutions such as Teams, Salesforce, Hubspot and many more.
  • Cloud version: Beginners and power users can start working with the cloud version immediately. The free trial allows you to test the workflows and all connectors extensively. If you need more workflow versions, you can upgrade to the affordable Starter or Pro version.
  • Self-hosting: The main advantage of the platform is the free option to host the tool on your own computer or a company server or provider. This gives you full control and more data protection, as the workflow data is not processed via the cloud.

Tutorial: Install n8n on your own computer

Here we show you step by step how to use n8n on your own computer free of charge. This can also be implemented for companies on a company server or provider. We follow the official n8n setup instructions. You can use npm or Docker for installation. As Docker is often a little easier for beginners, we will show you how to use Docker here.

Step 1: Install Docker

First, install Docker on your system. Docker allows you to run n8n in an isolated container. This is easy to do via download and installer. Here is the official Docker installation for Mac,Windows and Linux.

Docker Desktop nach der Installation. Hier kann man Docker-Images installieren, starten und stoppen.
Docker desktop after installation. Here you can install, start and stop Docker images

.

Step 2: Install n8n

We now install the official Docker image, which we then start in Docker Desktop with a click. We use a ready-made Docker image for this. If you want to create your own Docker image, it is best to follow the official n8n Docker installation instructionshere

Install image

  • We use this n8n Docker image “n8nio” from the official Docker Hub.
  • Open the Docker desktop
  • Click on the search icon above and enter “n8n”
  • Click on the pull button for the “n8nio/n8n” image
  • This will download the image
n8n-Docker-Image auswählen und installieren
Select and install the n8n Docker image

.

Start image

  • In Docker Desktop, switch to “Images” in the left menu
  • Click the play icon
n8n-Docker-Image starten
Start n8n Docker image

.

Preparation

  • Create 2 new folders in which the n8n data and the container settings are stored
  • Example for MacOS: Under Documents, we create the folders “n8n-data” and “n8n-container” here

Settings (on first start)

    • Container name: n8n (or any other name)
    • Host port: 5678
    • Host path: /Users/YOUR-USERNAME/Documents/n8n-data
    • Container path: /Users/YOUR-USERNAME/Documents/n8n-container
    • Environment variables: leave empty
    • Click Run button
URL der lokalen n8n-Instanz kopieren
Copy the URL of the local n8n instance

.

Step 3: Set up n8n workflow

Next, we try out a ready-made template so that we can get a result quickly.

Im n8n-Workflow-Template tragen wir unseren OpenAI-API-Key ein
We enter our OpenAI API key in the n8n workflow template

.

This is what n8n looks like in action

We have now installed a demo template that summarizes websites via GPT.

n8n in Aktion
n8n in action

FAQ – Frequently asked questions about n8n

How do you pronounce n8n correctly?

n8n actually means “nodemation” or in long “node-based workflow-automation” and is pronounced as “n-eight-n” or “nodemation”. The “8” is an abbreviated spelling and stands for the 8 letters between the “n “s. As a result, the tool has already become a catchy proper name that differs from other tool names and at the same time sounds a bit techie and nerdy.

Can n8n be used in compliance with data protection regulations?

The self-hosted version potentially offers the highest level of data security, as you have full control over the data. Of course, you have to ensure that the system is secure yourself. n8n is then neither a data processor nor a data controller, as you operate the tool yourself. According to the privacy policy, the system only sends anonymized diagnostic data and does not send any content, i.e. user data. The inspection and deletion of user data in the system is also required for data protection in accordance with the GDPR. If you can ensure this, n8n is a data protection-compliant solution for companies. For more information, see privacy and security information (n8n website)

Is n8n open source?

n8n is not completely open source software in the traditional sense, but uses a so-called “fair code” license model. The source code is publicly accessible, but commercial use is restricted. In addition, the solution is not OSI-compliant, so it is not really a full open source solution. It can therefore be used as follows:

  • Free use is possible
  • Self-hosting allowed (use the Docker image for this, see our tutorial)
  • The source code can be viewed and modified
  • Commercial use is restricted

Which companies use n8n?

According to the website, the following well-known companies are mentioned as examples: Ströer, Twilio, Paddle, CBS, Splunk, Guardian, Autodesk and others

What does n8n cost?

  • Cloud: Trial (free), Starter (20€/month), Pro (50€/month), Enterprise (individual). See cost overview
  • Self-hosted: free of charge

Conclusion: n8n is a high-flyer in the AI and automation tool landscape

n8n offers numerous advantages and excellent data protection with self-hosting, but requires some technical know-how for installation and setup. If you invest a little time in creating workflows and cleverly connecting the tools and connectors in series, you can use the automation platform to build your own tool chains that save time and money. It can be used to create smart solutions in marketing as well as in many other areas.