AutomationFlowsAI & RAG › Demo: My First AI Agent in N8n

Demo: My First AI Agent in N8n

Demo: My first AI Agent in n8n. Uses googleCalendarTool, chatTrigger, agent, lmChatOpenAi. Chat trigger; 5 nodes.

Chat trigger trigger★★☆☆☆ complexityAI-powered5 nodesGoogle Calendar ToolChat TriggerAgentOpenAI ChatMemory Buffer Window
AI & RAG Trigger: Chat trigger Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #PT1i+zU92Ii5O2XCObkhfHJR5h9rNJTpiCIkYJk9jHU= — 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
{
  "name": "Demo: My first AI Agent in n8n",
  "nodes": [
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "mode": "list"
        },
        "returnAll": true,
        "options": {
          "timeMin": "={{ $fromAI('after', 'The earliest datetime we want to look for events for') }}",
          "timeMax": "={{ $fromAI('before', 'The latest datetime we want to look for events for') }}",
          "singleEvents": true,
          "query": "={{ $fromAI('query', 'The search query to look for in the calendar. Leave empty if no search query is needed') }}"
        }
      },
      "id": "0d7e4666-bc0e-489a-9e8f-a5ef191f4954",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.2,
      "position": [
        880,
        220
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "5b410409-5b0b-47bd-b413-5b9b1000a063",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        360,
        20
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You're a helpful assistant that helps the user answer questions about their calendar.\n\nToday is {{ $now.format('cccc') }} the {{ $now.format('yyyy-MM-dd HH:mm') }}."
        }
      },
      "id": "29963449-1dc1-487d-96f2-7ff0a5c3cd97",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        560,
        20
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "cbaedf86-9153-4778-b893-a7e50d3e04ba",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        520,
        220
      ]
    },
    {
      "parameters": {},
      "id": "75481370-bade-4d90-a878-3a3b0201edcc",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        680,
        220
      ]
    }
  ],
  "connections": {
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "meta": {
    "templateId": "PT1i+zU92Ii5O2XCObkhfHJR5h9rNJTpiCIkYJk9jHU="
  },
  "tags": []
}
Pro

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

About this workflow

Demo: My first AI Agent in n8n. Uses googleCalendarTool, chatTrigger, agent, lmChatOpenAi. Chat trigger; 5 nodes.

Source: https://github.com/splx-ai/agentic-radar/blob/65a7e4bd01e2034c7cb52e9620eeed287688cc53/examples/n8n/simple_google_calendar_agent/Demo__My_first_AI_Agent_in_n8n.json — 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

AI Agent : Google calendar assistant using OpenAI. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, googleCalendarTool. Chat trigger; 13 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +2
AI & RAG

This template is a simple AI Agent that acts as a Google Calendar Assistant. It is designed for beginners to have their "first AI Agent" performing common tasks and to help them understand how it work

Chat Trigger, OpenAI Chat, Memory Buffer Window +2
AI & RAG

AI Agent : Google calendar assistant using OpenAI. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, googleCalendarTool. Chat trigger; 13 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +2
AI & RAG

35-ai-agent-google-calendar-assistant-using-openai. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, googleCalendarTool. Chat trigger; 13 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +2
AI & RAG

Reservation Medcin. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 12 nodes.

Chat Trigger, Agent, OpenAI Chat +3