AI Agent Google Calendar Management Tool using MCP - n8n Workflow

Use this comprehensive n8n workflow to create, update, delete, and check availability for Google Calendar events, driven contextually by an AI agent using the MCP protocol.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers and Engineers integrating conversational agents with enterprise tools.
System administrators looking for reliable n8n templates for scheduling automation.
Users needing robust calendar operations (create, delete, validate) driven by natural language commands.
Anyone seeking to build complex scheduling logic using the flexibility of an n8n node structure.

Overview

Managing calendar events programmatically often requires detailed date handling and logic checks (like ensuring a time slot is available before booking). This specialized n8n workflow solves this by acting as a suite of tools for an external AI agent using the Multi-Modal Context Protocol (MCP).

This single n8n workflow handles five distinct calendar operations: validating busy times, creating new events, deleting events, updating events, and retrieving specific event data. By leveraging the Tool Workflow n8n node, these actions are exposed to the AI agent, allowing the agent to perform complex scheduling tasks based on contextual input, making this one of the most powerful scheduling n8n templates available. This implementation ensures that complex logic, like availability checking, is handled robustly within the n8n environment.

How it Works

The core of this automation is a multi-entry n8n node design, primarily driven by the MCP protocol.


  1. Triggering: The workflow is primarily initiated via the When Executed by Another Workflow n8n trigger, which receives parameters (operation, startDate, endDate, timeZone, eventId) from an external caller, typically an AI agent utilizing one of the exposed Tool Workflow nodes.

  2. Data Standardization: The mapdata n8n node first normalizes the input dates, converting them to ISO format while respecting the provided timeZone using JavaScript expressions (DateTime module).

  3. Operation Routing: A central Operation Switch n8n node inspects the incoming operation parameter (getEvent, deleteEvent, createEvent, updateEvent, getEventData) and routes the flow accordingly.

  4. Calendar Actions (Google Calendar n8n node):

For Creating Events, the workflow first uses the Google Calendar n8n node to checkavailabilitytocreate. An If n8n node checks if the time is available; if it is, the event is created (createevent). If not, the workflow halts with a Stop and Error message.
For Deleting Events (deleteEvent1) or Updating Events (update
calendar), the required eventId is used directly with the respective Google Calendar operations.
* For Validating Busy Time (validateavailabilityevent) or Getting Event Data (geteventintimegap), the workflow queries the calendar based on the time window and returns structured JSON responses detailing availability or event details.

  1. AI Tool Definition: The initial MCP Server Trigger and the linked Tool Workflow n8n templates define the specific capabilities exposed to the external AI agent, turning this entire process into a cohesive, context-aware tool.

Installation Guide

To deploy and utilize this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided JSON code and import it into your n8n instance via the 'Workflows' menu, selecting 'New' and then 'Import from JSON'.

  2. Credentials Setup: Locate the Google Calendar n8n node instances (e.g., validateavailabilityevent, create_event). You must configure a valid Google Calendar OAuth2 API credential for each instance. Ensure this credential has permissions to read and write to your target calendar.

  3. Calendar ID Configuration: In all Google Calendar n8n node settings, replace the placeholder [email protected] with the actual ID of the Google Calendar you wish to manage.

  4. MCP Integration: The MCP Server Trigger n8n node generates a webhook URL. If you are using this with an external AI application or large language model (LLM), you will need to register this webhook endpoint and the exposed tools within your agent's configuration for seamless integration. This complex n8n template is now ready to run.

Node Details

MCP Server Trigger: This crucial n8n trigger initiates the workflow when an MCP-compliant AI agent needs to execute a tool. It defines the workflow's service endpoint for the AI ecosystem.
When Executed by Another Workflow (n8n trigger): The primary execution entry point. It captures parameters passed internally, likely initiated by the AI agent's call to one of the defined Tool Workflow nodes.
Tool Workflow (n8n node): Five instances (validatebusytime, createnewevent, deleteevent, updateevent, geteventsingaptime). These nodes register specific, descriptive tools with the MCP protocol, defining how the AI agent can call the main n8n workflow for distinct calendar actions.
Set (map_data): This n8n node ensures data hygiene by parsing and standardizing startDate and endDate inputs, applying the correct timeZone before processing, guaranteeing accurate time comparisons by the Google Calendar n8n node.
Switch (Operation): A core flow control n8n node that directs the data stream based on the requested operation parameter, ensuring the correct Google Calendar action is executed.
Google Calendar (n8n node): Multiple instances handle CRUD operations (Create, Read/Validate, Update, Delete). Key operations include getBusy (for validation), create, delete, update, and getAll (to fetch event data).

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Software Engineer with more than 8 years of experience—AI Educator focus on AI Agent

Featured*