Problem: AI chatbot that can search the web is not searching the web.
Using the n8n template (with no changes). Asked what are current (nov 2024) college football rankings. The query to SerpAPI was “query”: “November 2024 college football rankings”. The output was “response”: “{"title":"FBS I rankings"}”
The result from OpenAI was November 2023 CFP rankings.
In another example, I asked “What are some potential uses of AI Agents in 2025?”
In this case, SerpAPI was not even involved in the workflow.
Is there a way to force the AI Agent to use the tools? In this case, is there a way to force it to use SerpAPI? (Although, considering it’s response on CFP rankings, there isn’t anything to use.)
I’ve have multiple use cases for wanting to search the web and use the results in a workflow. My luck so far was a couple of different workflows with SerpAPI has not been very good.
Please share your workflow
The workflow is the exact same as the: AI chatbot that can search the web template.
{
“nodes”: [
{
“parameters”: {
“content”: “### The conversation history(last 20 messages) is stored in a buffer memory”,
“height”: 185,
“width”: 300
},
“id”: “3a3bcb2d-cb94-40d8-8b9e-322ea9d27f6e”,
“name”: “Sticky Note4”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
640,
540
],
“typeVersion”: 1
},
{
“parameters”: {},
“id”: “e279af43-b003-4499-b221-58716e735379”,
“name”: “On new manual Chat Message”,
“type”: “@n8n/n8n-nodes-langchain.manualChatTrigger”,
“position”: [
380,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“options”: {
“temperature”: 0.3
}
},
“id”: “f4f8bf03-a43e-4a1f-a592-cd0f8408f552”,
“name”: “Chat OpenAI”,
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“position”: [
480,
560
],
“typeVersion”: 1,
“credentials”: {
“openAiApi”: {
“id”: “N20CD6FcL79RauXg”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {},
“id”: “66b60f68-bae8-4958-ac81-03883f563ab3”,
“name”: “Wikipedia”,
“type”: “@n8n/n8n-nodes-langchain.toolWikipedia”,
“position”: [
1120,
600
],
“typeVersion”: 1,
“disabled”: true
},
{
“parameters”: {
“content”: “### Tools which agent can use to accomplish the task”,
“height”: 185,
“width”: 300
},
“id”: “70f6b43b-9290-4fbc-992f-0895d4578c9f”,
“name”: “Sticky Note3”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
980,
540
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: "### Conversational agent will utilise available tools to answer the prompt. ",
“height”: 211,
“width”: 422
},
“id”: “8696269f-6556-41f1-bbe4-5597e4e46e02”,
“name”: “Sticky Note6”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
600,
160
],
“typeVersion”: 1
},
{
“parameters”: {
“contextWindowLength”: 20
},
“id”: “6814967b-4567-4cdd-bf09-6b1b5ed0c68e”,
“name”: “Window Buffer Memory”,
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“position”: [
740,
600
],
“typeVersion”: 1
},
{
“parameters”: {
“options”: {}
},
“id”: “ce4358ac-c2cc-45ba-b950-247f8360b36c”,
“name”: “SerpAPI”,
“type”: “@n8n/n8n-nodes-langchain.toolSerpApi”,
“position”: [
1000,
600
],
“typeVersion”: 1,
“credentials”: {
“serpApi”: {
“id”: “YrSqEaULxI1MxdTN”,
“name”: “SerpAPI account”
}
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.input }}”,
“options”: {}
},
“id”: “de80add8-c37d-4d46-80ec-b43234e21150”,
“name”: “AI Agent”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“position”: [
680,
240
],
“typeVersion”: 1.6
}
],
“connections”: {
“On new manual Chat Message”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Chat OpenAI”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Wikipedia”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“Window Buffer Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“SerpAPI”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
}
},
“pinData”: {}
}
## Share the output returned by the last node
<!-- If you need help with data transformations, please also share your expected output. -->
## Information on your n8n setup
n8n version. Just signed up for free trial of cloud yesterday. So, presumably the latest release.
Free SerpAPI account.