i am facing always unauthorized error in “Google search in SerpApi” node and i am correctly apply api key there
Issue
Couldn’t connect with these settings
Authorization failed - please check your credentials
{
“name”: “Telgram1 Sub Workflow Search”,
“nodes”: [
{
"parameters": {
"inputSource": "passthrough"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": \[
0,
0
\],
"id": "f5f9534c-c16c-4713-bbe7-ce63f8205078",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.query }}",
"options": {
"systemMessage": "=You are a helpful assistant for research\\n\\nyou can use your tools to search the web."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": \[
208,
0
\],
"id": "41e9252f-13b1-4c17-b449-8e76ee824652",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"\__rl": true,
"mode": "list",
"value": "gpt-5-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": \[
80,
208
\],
"id": "8adc58e1-a04e-4849-94c2-9177b54e1e8b",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": null,
"name": "",
"\__aiGatewayManaged": true
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"typeVersion": 1,
"position": \[
224,
304
\],
"id": "499b12b9-5f77-4f53-acd9-692237079398",
"name": "Wikipedia"
},
{
"parameters": {
"resource": "all",
"limit": 20,
"additionalFields": {
"keyword": "={{ /\*n8n-auto-generated-fromAI-override\*/ $fromAI('Keyword', \`\`, 'string') }}"
}
},
"type": "n8n-nodes-base.hackerNewsTool",
"typeVersion": 1,
"position": \[
368,
288
\],
"id": "da7806e6-7a74-48b4-9733-d1cb0aa634ea",
"name": "Hacker News"
},
{
"parameters": {
"q": "={{ /\*n8n-auto-generated-fromAI-override\*/ $fromAI('Search_Query__q\_', \`\`, 'string') }}",
"location": "={{ /\*n8n-auto-generated-fromAI-override\*/ $fromAI('Location__location\_', \`\`, 'string') }}",
"additionalFields": {},
"requestOptions": {}
},
"type": "n8n-nodes-serpapi.serpApiTool",
"typeVersion": 1,
"position": \[
544,
288
\],
"id": "67ddaf70-2408-4e19-a79c-a355703a0d35",
"name": "Google search in SerpApi",
"credentials": {
"serpApi": {
"id": "uF8n5EBM0zMke4ll",
"name": "SerpApi account"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.query }}",
"options": {
"systemMessage": "=You are a helpful research agent.\\nYou use your Tools to search the web, you have access to hackernwes, wikipedia and the serpAPI, surch them all or use the rigth one."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": \[
1152,
720
\],
"id": "a71e2746-f386-4e99-91c4-4d3ab0b4d758",
"name": "AI Agent1"
},
{
"parameters": {
"model": {
"\__rl": true,
"value": "gpt-4o",
"mode": "list",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": \[
1072,
960
\],
"id": "671a8ea6-707f-4409-b2d1-6a14d8dc5ffa",
"name": "OpenAI Chat Model1"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"typeVersion": 1,
"position": \[
1216,
960
\],
"id": "8fd5c8fb-a016-4fac-bbdd-47dbf6faa59b",
"name": "Wikipedia1"
},
{
"parameters": {
"resource": "all",
"limit": 20,
"additionalFields": {
"keyword": "={{ /\*n8n-auto-generated-fromAI-override\*/ $fromAI('Keyword', \`\`, 'string') }}"
}
},
"type": "n8n-nodes-base.hackerNewsTool",
"typeVersion": 1,
"position": \[
1360,
960
\],
"id": "7aa1304b-cd8c-40a8-8c10-25b60516f28f",
"name": "Hacker News1"
}
],
“pinData”: {
"When Executed by Another Workflow": \[
{
"json": {
"query": "Honda bike news"
}
}
\]
},
“connections”: {
"When Executed by Another Workflow": {
"main": \[
\[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
\]
\]
},
"OpenAI Chat Model": {
"ai_languageModel": \[
\[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
\]
\]
},
"Wikipedia": {
"ai_tool": \[
\[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
\]
\]
},
"Hacker News": {
"ai_tool": \[
\[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
\]
\]
},
"Google search in SerpApi": {
"ai_tool": \[
\[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
\]
\]
},
"OpenAI Chat Model1": {
"ai_languageModel": \[
\[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
\]
\]
},
"Wikipedia1": {
"ai_tool": \[
\[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
\]
\]
},
"Hacker News1": {
"ai_tool": \[
\[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
\]
\]
}
},
“active”: false,
“settings”: {
"executionOrder": "v1",
"binaryMode": "separate"
},
“versionId”: “c1435b84-8b12-45c4-b332-09340a9fdc93”,
“meta”: {
"templateCredsSetupCompleted": true,
"instanceId": "9f81a7770771d2db166482bd80259ea45591cbec80ffb304895a93391779c88e"
},
“id”: “N2zPDbeMqBtZ5SwX”,
“tags”: []
}