AutomationFlowsAI & RAG › Manage Google Calendar Events with Natural Language Using Gemini 1.5 Flash

Manage Google Calendar Events with Natural Language Using Gemini 1.5 Flash

BySakar Dahal @sakar-dahal on n8n.io

This is the AI agent which will set the event in the Google Calendar and get the events from the calendar based on the prompt provided to AI agent based on Gemini.

Chat trigger trigger★★★☆☆ complexityAI-powered12 nodesGoogle Calendar ToolMemory Buffer WindowGoogle Gemini ChatAgentChat Trigger
AI & RAG Trigger: Chat trigger Nodes: 12 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5165 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "Zmia0j2r2xRgGc2J",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "My workflow",
  "tags": [],
  "nodes": [
    {
      "id": "ba7b6068-39e1-415b-9fd4-591304c2e37b",
      "name": "Google Calendar1",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        160,
        20
      ],
      "parameters": {
        "options": {},
        "timeMax": "={{ $fromAI(\"beforeDate\", \"This is the time user wants to search for the event past\") }}",
        "timeMin": "={{ $fromAI(\"afterDate\", \"This is the time user wants to search for the event past\") }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "user@example.com",
          "cachedResultName": "testn8n"
        },
        "operation": "getAll"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e7fd1c3d-5f5c-4033-b9a9-5a97fa930a1c",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -60,
        80
      ],
      "parameters": {
        "end": "={{ $fromAI(\"endTime\",\"This is the end time of the event\") }}",
        "start": "={{ $fromAI(\"startTime\",\"This is the start time of the event\") }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "user@example.com",
          "cachedResultName": "testn8n"
        },
        "additionalFields": {
          "summary": "={{ $fromAI(\"summary\",\"This is the summary/title of the event\") }}"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "78f963b1-2581-4106-96f8-9142319154d4",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -320,
        60
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "c78dad7d-0997-4ac8-b30d-9d8563665059",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -560,
        140
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash"
      },
      "typeVersion": 1
    },
    {
      "id": "2dd0a798-19df-4579-899d-09d92be3a3ce",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -280,
        -200
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are a helpful assistant\n\nThe current date is {{ $now }}.\n\nYou are connected to a Google Calendar tool that lets you search for calendar events between two dates using the variables `afterDate` and `beforeDate` in ISO format (e.g., 2025-06-24T00:00:00Z). When the user asks for events, you must extract those fields and return them to the tool to make the query.\n"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3a00ee73-ae8e-4913-b948-2ff2308b8775",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -580,
        -220
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "d6300f52-3c5f-47e8-9dce-2018f22b081d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -300
      ],
      "parameters": {
        "height": 240,
        "content": "Send the prompt if we want to set the event on the calendar or get events available in the calendar"
      },
      "typeVersion": 1
    },
    {
      "id": "e48711cf-8484-42eb-950e-937baa5cee76",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -300
      ],
      "parameters": {
        "width": 360,
        "height": 220,
        "content": "Responsible for injecting the system prompt so things that are related for the project is only carried out. Also connects Gemini, Memory and calendar application together"
      },
      "typeVersion": 1
    },
    {
      "id": "cdb655b0-52e8-4335-9570-0b05b06418b1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -620,
        40
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Takes in the prompt and gives out the small event name based on the prompt"
      },
      "typeVersion": 1
    },
    {
      "id": "56b1989b-73e4-4548-a8ee-c0da3f1d8d9b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        60
      ],
      "parameters": {
        "height": 200,
        "content": "\n\n\n\n\n\n\n\n\nInbuilt memory for n8n which will store the value prompt received by AI agent so model can remember the conversation"
      },
      "typeVersion": 1
    },
    {
      "id": "bbfa4e3b-de8a-4453-ae33-7d656a0324a0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        60
      ],
      "parameters": {
        "width": 200,
        "height": 240,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\nCalendar node responsible for adding event in the calendar"
      },
      "typeVersion": 1
    },
    {
      "id": "90780243-d4a9-41f0-8359-4ed773198660",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        -20
      ],
      "parameters": {
        "width": 200,
        "height": 240,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\nCalendar node responsible for getting all the events in asked timeframe"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d64ed07c-8f62-404c-84b2-80f4bac64809",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This is the AI agent which will set the event in the Google Calendar and get the events from the calendar based on the prompt provided to AI agent based on Gemini.

Source: https://n8n.io/workflows/5165/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Google Calendar Tool, Gmail Tool, Chat Trigger +6
AI & RAG

Personal Assistant MCP server. Uses chatTrigger, lmChatGoogleGemini, memoryBufferWindow, mcpTrigger. Chat trigger; 20 nodes.

Chat Trigger, Google Gemini Chat, Memory Buffer Window +6
AI & RAG

Personal Assistant MCP server. Uses chatTrigger, lmChatGoogleGemini, memoryBufferWindow, mcpTrigger. Chat trigger; 20 nodes.

Chat Trigger, Google Gemini Chat, Memory Buffer Window +6
AI & RAG

Wouldn't it be cool to just tell your computer or phone to "schedule a meeting with Sarah next Tuesday at 3 PM" or "find John Doe's email address" and have it actually do it? That's the dream of a per

Chat Trigger, Google Gemini Chat, Memory Buffer Window +6
AI & RAG

⚠️ Disclaimer: This workflow uses Google Calendar and Gmail nodes which you will have to configure yourself

Agent, Google Gemini Chat, Memory Buffer Window +4