{
  "name": "Manage Google Calendar events with GPT‑4 and an AI assistant",
  "nodes": [
    {
      "id": "e0fabc85-febd-41bc-b87f-b5ac181b75aa",
      "name": "Set Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1008,
        240
      ]
    },
    {
      "id": "1179a3bf-829c-4a63-8258-6fdd3483a4cf",
      "name": "Set Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1008,
        80
      ]
    },
    {
      "id": "9e1324f8-2f92-4d85-a238-3621aad1a1d6",
      "name": "Manage Calendar with AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        80
      ]
    },
    {
      "id": "a46ed702-dca7-4858-bd2e-1cf8290091f4",
      "name": "Create Calendar Event with Attendee",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1056,
        512
      ]
    },
    {
      "id": "ca988e4c-2ee3-4018-a2b5-483ba45dba0f",
      "name": "Create Calendar Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        896,
        512
      ]
    },
    {
      "id": "fe7c894c-42ae-4d3a-9e68-5ba02209d448",
      "name": "Get Calendar Events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        576,
        512
      ]
    },
    {
      "id": "57e3b327-ac97-442a-bf10-a15ec2771991",
      "name": "Delete Calendar Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        416,
        512
      ]
    },
    {
      "id": "6198f0c1-c5ee-4d74-ad0e-b76ae6e4a3ea",
      "name": "Update Calendar Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        736,
        512
      ]
    },
    {
      "id": "867bf61d-bfda-4c77-9ec9-17f45e09f58b",
      "name": "Receive Calendar Query",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        384,
        64
      ]
    },
    {
      "id": "b03e6e02-620c-4566-8968-40dae8b1f822",
      "name": "OpenAI GPT-4.1 Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        624,
        240
      ]
    },
    {
      "id": "84c0043b-d65b-437e-b780-0f329150d6b7",
      "name": "Intro Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -96
      ],
      "parameters": {
        "width": 384,
        "height": 784,
        "content": "## Google Calendar AI Assistant\n\n### **What it does:**\nAI-powered calendar management sub-workflow that creates, retrieves, updates, and deletes Google Calendar events via natural language queries.\n\n#"
      }
    },
    {
      "id": "fd80754c-febe-427d-989e-a04784adfc0e",
      "name": "Section 1 Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -96
      ],
      "parameters": {
        "width": 260,
        "height": 468,
        "content": "## 1. Receive Query\n\nSub-workflow trigger accepts a `query` string from the parent workflow containing the user's natural language calendar request."
      }
    },
    {
      "id": "6e951093-6175-4e37-8bcf-bb8d6ac2c541",
      "name": "Section 2 AI Agent",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -96
      ],
      "parameters": {
        "width": 320,
        "height": 466,
        "content": "## 2. AI Calendar Agent\n\nGPT-4.1 interprets the natural language query, selects the appropriate Google Calendar tool, and executes the operation. Defaults to 1-hour events when duration is unspecified"
      }
    },
    {
      "id": "7d861538-61e1-4ce6-8345-1dd838fb40c2",
      "name": "Section 3 Calendar Tools",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        400
      ],
      "parameters": {
        "width": 920,
        "height": 288,
        "content": "## 3. Google Calendar Tools\n\nFive calendar operations available to the AI agent: **Delete**, **Get**, **Update**, **Create**, and **Create with Attendee**. Agent must retrieve events before updating o"
      }
    },
    {
      "id": "0a0c2cb3-4ede-457f-a797-075da2535df6",
      "name": "Section 4 Response",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -96
      ],
      "parameters": {
        "width": 280,
        "height": 480,
        "content": "## 4. Return Response\n\nRoutes the agent output back to the parent workflow. **Success** returns the AI agent's output. **Error** returns a fallback message prompting the user to try again."
      }
    },
    {
      "id": "4bd2b674-172f-4df0-9a54-d0a9451b0c50",
      "name": "Contact & Attribution",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        -96
      ],
      "parameters": {
        "width": 700,
        "height": 1284,
        "content": "## Was this helpful? Get in touch!\n\nI really hope this automation helped you. Your feedback is incredibly valuable and helps me create better resources for business and the n8n community.\n\n### **Have "
      }
    }
  ],
  "connections": {
    "Get Calendar Events": {
      "ai_tool": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Receive Calendar Query": {
      "main": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4.1 Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Manage Calendar with AI Agent": {
      "main": [
        [
          {
            "node": "Set Success Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Calendar Event with Attendee": {
      "ai_tool": [
        [
          {
            "node": "Manage Calendar with AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}