Ends in
00
days
00
hrs
00
mins
00
secs
ENROLL NOW

🎁 Get 30% OFF All Azure Reviewers – Practice Exams as LOW as $9.09 USD!

Getting Started with n8n + A Quick Workflow Example

Home » Others » Getting Started with n8n + A Quick Workflow Example

Getting Started with n8n + A Quick Workflow Example

Last updated on September 1, 2025

In a world full of repetitive tasks, automation is not a new thing. For years, humanity designed machines and systems to take over the monotonous or large-scale work from humans. We’ve come a long way from industrial automation, it now uses the algorithms to create system that can automatically check, send, or even sort your emails and documents, manage your store’s inventory, and even drive (would I still need a license in this case?).

With all the power automation gave us, we still crave more. We thought ‘what if automation could learn, adapt, and create?’ a thought that is coming into reality with the help of artificial intelligence (AI). We made learning available to mere automating tools; we give hands to once just a brain. Automation is now smarter, faster, and even more powerful.

Getting Started with n8n + A Quick Workflow Example Cover

Why use n8n to Automate?

n8n is a powerful open-sourced automation tool. It is free and contains advance tools where we can design and customize our own automated workflow. Unlike other tools in the market, n8n is preferred due to its ability to be self-hosted which is important for when you or your business needs privacy and security. 

Low-code and easy drag and drop pre-built integration in the user interface also is great for beginners but if the pre-built tools are not acting like you want it too, there is an option to customize with JavaScript to create your own logic, manipulate data, and connect to services. 

Well, let’s stop the introduction and proceed where the actual action is in! 

Step 1: Docker installation

Docker Installation

n8n deployment does not really need a docker, however life will get more easier with one! 

  1. Go to the official Docker Desktop Download.
  2. Download the right version for your device.
  3. Install Docker and choose ‘yes’ if asked to download a WSL.

All done! Docker is first made for Linux, but with the help of Docker Desktop, we can use it in another operating system.

Tutorials dojo strip

Step 2: Getting started with n8n

So, setting up n8n is actually the one of the easiest things you might encounter in tech because with n8n, they already got it all-ready for you with just 2 commands. Now, you can go and check the main documentation repo of n8n here: n8n GitHub or just follow along with me in this article!

Git Bash N8N

  1. To start, open your terminal, any will do but, in this project I used Git Bash.
  2. Enter this command to create a volume named n8n_data in Docker:

    docker volume create n8n_data
    
  3. After the volume is created, run this command

    docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
    • Docker run : will run a new container.
    • -it : attaches an interactive terminal so you can view the logs.
    • –rm : this will automatically remove the container we created when we stop it.
    • –name n8n : we do this to give our container a meaningful name instead of remembering the container ID.
    • -p 5678:5678 : this is where we do port binding the 5678 in our host to the 5678 port of the container, so we can access the n8n in our browser.
    • -v n8n_data:/home/node/.n8n : mounts the created n8n_data volume into the container’s directory /home/node/.n8n, this is done so we don’t wipe out the files and data we have in our container.
    • docker.n8n.io/n8nio/n8n : this is the image we are running pulled from the latest official n8n image.

Step 3: Constructing your first n8n workflow

To try out the automation workflow, let’s create a simple Chatbot that uses an LLM and is capable of using Google search!

n8n AI Chatbot

All starts with a trigger! 👆

  1. To create a workflow, click the ‘Create Workflow’ button.
  2. A clean Figma like interface will show up. Click the plus button so we can add our trigger. Choose the ‘Chat Trigger’.

n8n Chat Trigger

Adding Google Search Superpowers to Chat 

Now to make our chatbot be able to use Google Search🔍, we can either add it now or later in the Agent AI as a tool. However, adding a tool to the AI Agent means you will use an LLM model that can call and use tools (and that will need a subscription!). So as a work around, we will add it now and feed the information later to our AI Agent 🤖.

  1. Search SerpApi, this will allow our chatbot to search Google.
  2. Install the node and look for Google Search amongst the options. This will add the node to our canvas.
  3. Click the create new credential and to use SerpApi we need to get API Keys. 
    n8n Create new credential
  4. To do that, go to SerpApi: Google Search API and register. You will get 250 free searches per month! Sweet.
  5. Copy your API Keys and go back to n8n to paste the API key.
    n8n API Keys
  6. We also need to edit the Search Query field with {{$json.chatInput}} so it sees the chat input we gave to the trigger.  
    n8n Search Query

Preparing Search Data for the AI Agent

Now, these actions will fail if we just connect it straight to an AI Agent. We need to add a buffer where we can normalize the top searches we get so our AI Agent can read them as sources.

  1. We do that with a set field and custom JavaScript code.
    n8n Set field
  2. In the Include other input Fields, select the Expression tab and paste this JavaScript code:

    {{ 
      ($json.organic_results || [])
        .slice(0,5)
        .map((r,i) => `${i+1}. ${r.title} — ${r.snippet} (${r.link})`)
        .join('\n')
    }}

    n8n set field expression

Making Conversation Smarter with LLM and Memory

Now, we can go and finally add our AI Agent!!

n8n AI Agent

To give our AI Agent the power to understand the chat input, we add an LLM to the mix. In n8n, you can use any of the LLM, however as mentioned before, we are making this project FREE OF CHARGE :b so we will choose OpenRouter.

  1. Click the chat model plus and choose OpenRouter Chat Model. 
  2. Create a new credential. And get an API key from OpenRouter:
    • Go to keys section n8n keys section
    • Create a new API key. You can name it anything you want. And ensure that you copy and keep it somewhere safe ><.
  3. Paste the API keys into n8n and we need to choose a model that is free. (Just search free and choose any;>).
    n8n free chat models
  4. To make the AI Agent remember our conversation, add a Simple Memory to it by clicking the plus button in the memory node.
    n8n simple memory

The last configuration!

We prep our searched data before, but we still need it to be presented into readable structure for our AI buddy.

  1. Change the option into ‘Define below’ and;
  2. Free AWS Courses
  3. Paste this code to the AI Agent to make it fully understand the chat input of the user and the top Google Search as context!
    {{$node["When chat message received"].json.chatInput}}
    
    {{
    ($json.organic_results || [])
    .slice(0,5)
    .map((r,i) => `${i+1}. ${r.title} — ${r.snippet} (${r.link})`)
    .join('\n')
    }}

n8n last configure

Open the chat and have fun with your very own chat AI buddy!

You can ask it with anything, kind of like any AI chat model out there~ However, it is limited right now with text since we are using free API plans haha! If you feel like splurging, all the power to you but n8n even as a free tool can be modified and design to be of use to our daily repetitive tasks! 

n8n TD

n8n doja

Nonetheless, n8n is not just a simple script that you run once, and it’s done. In real context, it needs to be running continuously in the background to finish complex automation. You can do this with hosting it in cloud, you can try watching this video tutorial to make a self-hosted n8n workflow: The REAL Way to Host n8n for Free – AWS EC2 & Docker Guide.

References:

  1. n8n Tutorial: No-Code Workflow Automation with AI Integration – Geeky Gadgets
  2. n8n-io/n8n: Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

🎁 Get 30% OFF All Azure Reviewers – Practice Exams as LOW as $9.09 USD!

Tutorials Dojo portal

Learn AWS with our PlayCloud Hands-On Labs

🧑‍💻 CodeQuest – AI-Powered Programming Labs

FREE AI and AWS Digital Courses

Tutorials Dojo Exam Study Guide eBooks

tutorials dojo study guide eBook

FREE AWS, Azure, GCP Practice Test Samplers

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Join Data Engineering Pilipinas – Connect, Learn, and Grow!

Data-Engineering-PH

Ready to take the first step towards your dream career?

Dash2Career

K8SUG

Follow Us On Linkedin

Recent Posts

Written by: Daniela Joaquin

Daniela Joaquin or "Dani," is an AWS Certified Cloud Practitioner and currently an intern at Tutorials Dojo. She’s a Computer Science student at the Polytechnic University of the Philippines who loves blending tech with creativity. Driven by curiosity and purpose, Dani brings energy to every initiative she joins and is known for her active involvement in student organizations that promote growth and collaboration.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?