AutomationFlowsAI & RAG › Sub Calender Agent

Sub Calender Agent

Sub Calender Agent. Uses lmChatOpenAi, executeWorkflowTrigger, googleCalendarTool, agent. Event-driven trigger; 10 nodes.

Event trigger★★★☆☆ complexityAI-powered10 nodesOpenAI ChatExecute Workflow TriggerGoogle Calendar ToolAgent
AI & RAG Trigger: Event Nodes: 10 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → Execute Workflow 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": "Sub Calender Agent",
  "nodes": [
    {
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "id": "c9e4b6e3-9a1b-4080-83d8-58f664a2e5d1",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        -640,
        280
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7ab380a2-a8d3-421c-ab4e-748ea8fb7904",
              "name": "response",
              "value": "Unable to perform task. Please try again.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "dc3b5a31-1c29-4f0b-9cd8-913bcf9fc0cd",
      "name": "Try Again",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -120,
        80
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "39c2f302-03be-4464-a17a-d7cc481d6d44",
              "name": "=response",
              "value": "={{$json.output}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "6ea8ad28-24fd-4632-b0ba-a06542618750",
      "name": "Success",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -120,
        -100
      ]
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -800,
        60
      ],
      "id": "ab6e3388-1993-4e63-ba9d-2172f8f77ef0",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "operation": "update",
        "calendar": {
          "__rl": true,
          "value": "arnio93@gmail.com",
          "mode": "list",
          "cachedResultName": "arnio93@gmail.com"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', `Die ID des Ereignisses.`, 'string') }}",
        "updateFields": {
          "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `Der Endzeitpunkt des Ereignisses.`, 'string') }}",
          "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', `Der Startzeitpunkt des Ereignisses.`, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        0,
        460
      ],
      "id": "5ac94b75-346b-45ba-a28d-e32484f2f70c",
      "name": "updateEvent",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "delete",
        "calendar": {
          "__rl": true,
          "value": "arnio93@gmail.com",
          "mode": "list",
          "cachedResultName": "arnio93@gmail.com"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', `Die ID des Ereignisses.`, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        140,
        440
      ],
      "id": "060261f1-5819-4a37-bcef-1b90018d9e50",
      "name": "deleteEvent",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "arnio93@gmail.com",
          "mode": "list",
          "cachedResultName": "arnio93@gmail.com"
        },
        "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', `Der Tag vor dem vom Nutzer gew\u00fcnschten Datum.`, 'string') }}",
        "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', `Der Tag nach dem vom Nutzer gew\u00fcnschten Datum.`, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        -320,
        440
      ],
      "id": "88eea132-7a56-48b2-b41c-20699ccd27aa",
      "name": "getEvents",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "arnio93@gmail.com",
          "mode": "list",
          "cachedResultName": "arnio93@gmail.com"
        },
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', `Der Startzeitpunkt des Ereignisses.`, 'string') }}",
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `Der Endzeitpunkt des Ereignisses.`, 'string') }}",
        "additionalFields": {
          "attendees": [],
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', `Der Titel des Ereignisses.`, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        -460,
        440
      ],
      "id": "73ae2d15-183c-43af-ad07-6fdc2394ed17",
      "name": "createEvent",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "arnio93@gmail.com",
          "mode": "list",
          "cachedResultName": "arnio93@gmail.com"
        },
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', `Der Startzeitpunkt des Ereignisses.`, 'string') }}",
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `Der Endzeitpunkt des Ereignisses.`, 'string') }}",
        "additionalFields": {
          "attendees": [
            "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Attendees', `Die Emailadresse des Teilnehmers.`, 'string') }}"
          ],
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', `Der Titel des Ereignisses.`, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        -160,
        440
      ],
      "id": "1d4218ed-d383-436e-a782-1e8cec06f2dd",
      "name": "createEventWithAttendee",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=# Role  \nYou are a calendar agent. Your tasks include creating, retrieving, and deleting events in the user's calendar.  \n\n# Tools  \n\n## getEvents  \nUse this tool to retrieve calendar schedules upon request.  \n\n## createEvent  \nUse this tool to create a solo appointment.  \n\n## updateEvent  \nUse this tool to update an event. You must first use **\"getEvents\"** to retrieve the ID of the event that needs to be updated.  \n\n## createEventWithAttendee  \nUse this tool to schedule an event with attendees.  \n\n## deleteEvent  \nUse this tool to delete an event. You must first use **\"getEvents\"** to retrieve the ID of the event that needs to be deleted.  \n\n  \ndate/time: **{{ $now }}**  \n"
        }
      },
      "id": "dbb3898e-a8dd-42ea-8a9b-0e126029ceda",
      "name": "Calender Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.6,
      "position": [
        -560,
        60
      ],
      "onError": "continueErrorOutput"
    }
  ],
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Calender Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "updateEvent": {
      "ai_tool": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "deleteEvent": {
      "ai_tool": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "getEvents": {
      "ai_tool": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "createEvent": {
      "ai_tool": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "createEventWithAttendee": {
      "ai_tool": [
        [
          {
            "node": "Calender Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calender Agent": {
      "main": [
        [
          {
            "node": "Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Try Again",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cded8cd6-a778-4b33-b495-9d9c282cae7e",
  "id": "52lAjL1evSpdHmzO",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Sub Calender Agent. Uses lmChatOpenAi, executeWorkflowTrigger, googleCalendarTool, agent. Event-driven trigger; 10 nodes.

Source: https://github.com/rajaaryan779/n8n-workflows/blob/5e47b43d39b7384aefcb68054ec7a70308bafc52/n8n-workflows/Sub_Calender_Agent.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

I prepared a comprehensive guide detailing how to create a Smart Agent that automates meeting task management by analyzing transcripts, generating tasks in Airtable, and scheduling follow-ups when nec

Agent, OpenAI Chat, Tool Workflow +5
AI & RAG

Who is this for? Professionals, teams, and AI builders needing instant calendar management via natural language – no more manual event creation or hunting.

Agent, Google Calendar Tool, Execute Workflow Trigger +1
AI & RAG

🤖Calendar Agent. Uses lmChatOpenAi, agent, googleCalendarTool, executeWorkflowTrigger. Event-driven trigger; 10 nodes.

OpenAI Chat, Agent, Google Calendar Tool +1
AI & RAG

__Calendar_Agent. Uses agent, googleCalendarTool, executeWorkflowTrigger, lmChatOpenAi. Event-driven trigger; 10 nodes.

Agent, Google Calendar Tool, Execute Workflow Trigger +1
AI & RAG

What this workflow does

Execute Workflow Trigger, Agent, OpenAI Chat +2