403 Errors when testing the AI Agent node

When testing the AI agent node I keep getting a general 403 error. Not sure what is erroring out or why I am getting a 403 just testing the node.

Problem running workflow, request failed with status code of 403

{
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "189c270c-cc80-478f-b359-572d08c00348",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -180,
        0
      ],
      "id": "57614452-99b2-4dc3-b2a1-e985631681ba",
      "name": "Webhook",
      "webhookId": "189c270c-cc80-478f-b359-572d08c00348"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.event.text }}",
        "options": {
          "systemMessage": "You are TimelyCare's helpful personal Information Technology assistant. Your goal will be to help users with their issues."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        40,
        0
      ],
      "id": "69b6a1ff-18b1-4752-911d-1591427cc4cc",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        20,
        220
      ],
      "id": "e085ffba-6850-4c97-bb69-d7691882b258",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "uZAAgRRFQVtvfZST",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.body.event.thread_ts }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        220,
        240
      ],
      "id": "f3b73b98-c9fa-470d-a31c-92448de63ab2",
      "name": "Simple Memory"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "8480d55f8af89498be533de09d63a71f23660e35a0c5d494018f3267a6f8947e"
  }
}```

- **n8n version:** 1.85.4
- **Database (default: SQLite):** SQLite
- **n8n EXECUTIONS_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

Hello @

Below is a suggestion to help you with your problem.

Update your N8N version, because it will fix any BUG that may be happening. Update according to the documentation below - Release notes | n8n Docs

This error shows that you are having an authentication or permissions problem when trying to access the Google Gemini API. See the documentation below to help you with this failure, in case it still persists after updating your N8N

Remember to DEPLOY your VPS so that the settings are updated

I hope I have helped in some way.

If this suggestion solved your problem, mark my post as a solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find the answer to the original question and click the heart. Thank you :blush: