n8n is a platform that can be used to automate most of your workflows. In addition to AI agents, now you can assign specific tasks to your agent & avoid doing repetitive tasks.
In this read, we have created a simple AI agent that, when needed, will use the SERP data (Using the SERP API).
Also, at the end of the article, I will give you a blueprint to use on your n8n account.
What would you need for this setup?
- Account on n8n
- Access to Scrapingdog’s Key (1000 Free Credits)
& that’s it.
Let’s start building it!
The first thing is to sign up for an n8n account, it gives you 14 day free trial, or you can self host this platform.
Start building your workflow.
The trigger in our automation has been kept to “On Chat Message.”
Once checked, our editor will look something like below.
Now let’s connect the AI-Agent node to our workflow.
Before we move forward, if you are new to no-code automation or tools, understand that AI agents are not self-sustainable.
They need a LLM model, storage (memory here), and any other tools that can help them and give a suitable response.
Think of it as a medium to transfer tasks to other resources (LLM, storage, APIs), but then to build it as a working system, we will connect the LLM first.
Okay, so you have an AI agent now, let’s give a system prompt to it to handle how it works.
The prompt I have given is: — “You are a helpful assistant that answers whatever question user may ask. You will search the intent for the latest information when required. Give the response in JSON.”
This system prompt will be used by the LLM model we attach to our system.
Let’s connect the LLM model to it. I am using OpenRouter (it is an aggregator of LLM models)
You can use even the dedicated nodes of AI node, in OpenRouter, I have to select which particular LLM model I want to use.
After authenticating with OpenRouter, choose the AI model.
Now let’s give the storage memory to AI agent.
n8n has a built-in node to store some data in the workflow & for this tutorial, we will use that only.
Select this, and mention the no. of messages it remembers in a particular chat, I am keeping it to 5.
It’s time to connect tools to our workflows. The first one I will be connecting to will be the Google Search API from Scrapingdog. Since I want my agent to scrape Google search results and find the real-time data.
Using the HTTP node, I will give the endpoint of the Google search API.
You can read the documentation to understand how this API works.
There are two necessary parameters, one is the API_KEY, which you will get from the dashboard when you sign up for the first time (1000 Free Credits).
The other necessary parameter is the query that needs to be passed to search in Google.
Toggle to on the button just below ‘Send Query Parameters’
We have opted for the query parameter so that our Agent needs it can use the API.
There will be cases when there won’t be any need to use the API, and the workflow will still work flawlessly.
To make our agent better and more functional, let’s add a calculator too in the tool.
This is how our AI agent in n8n will look: –
Here’s the blueprint for this automation that you can use as is in your n8n account.
You would only need access to the API_KEY from Scrapingdog and any LLM model.
Just to give you a brief again of what our AI agent is capable: –
- It can pull data from LLM (Open AI)
- It can remember up to 5 previous messages you throw at it.
- Can scrape Google Search Results Real-Time (Using Scrapingdog’s Google SERP API)
- Has a calculator that can be used in calculations (If Any)
Here’s a small GIF that shows how our Agent would work.

Conclusion
Here are more automations we have built using Make
