This workflow corresponds to n8n.io template #17218 — 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 →
{
"id": "P8EfNy84W8wSuqu4",
"meta": {
"builderVariant": "mcp",
"aiBuilderAssisted": true
},
"name": "Run a personal AI assistant on MCP servers for calendar, email and utilities in n8n",
"tags": [],
"nodes": [
{
"id": "874746c2-77bb-4e09-9a55-df32e3efe985",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-384,
48
],
"parameters": {
"options": {}
},
"typeVersion": 1.4
},
{
"id": "6b9a1d1f-06f2-4930-b6f6-549f0840ef71",
"name": "Configuration",
"type": "n8n-nodes-base.set",
"position": [
-144,
48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cfg-model",
"name": "openai_model",
"type": "string",
"value": "gpt-5.4"
},
{
"id": "cfg-mem",
"name": "memory_context_window",
"type": "number",
"value": 10
},
{
"id": "cfg-prompt",
"name": "system_prompt",
"type": "string",
"value": "=You are Dr. Firas' personal AI assistant. You help the user manage their calendar and email and answer quick questions by calling tools exposed through three MCP servers (Calendar, Gmail, Utilities).\n\nCurrent date and time: {{ $now }}.\n\nRules:\n- Always confirm dates, times, recipients and amounts before creating or changing anything.\n- For email, ALWAYS create a DRAFT for the user to review. Never claim an email was sent.\n- For calendar changes, first search to find the correct event and its ID, then update or delete it.\n- Be concise and friendly, and answer in the user's language."
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "fb8fc332-051b-4556-972e-92e33745797d",
"name": "AI Assistant (MCP Client)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
128,
48
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "={{ $(\"Configuration\").item.json.system_prompt }}"
},
"promptType": "define"
},
"typeVersion": 3.1
},
{
"id": "9cc69b50-f28b-4dcd-b066-506e20b02d8f",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
16,
272
],
"parameters": {
"model": {
"__rl": true,
"mode": "id",
"value": "={{ $(\"Configuration\").item.json.openai_model }}"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "a43e854c-ca00-46c6-82be-8f82b649a6e6",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
176,
272
],
"parameters": {
"contextWindowLength": "={{ $(\"Configuration\").item.json.memory_context_window }}"
},
"typeVersion": 1.4
},
{
"id": "43ce17d5-3214-480b-a9d8-2aef077750d6",
"name": "Calendar MCP Client",
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"position": [
320,
256
],
"parameters": {
"options": {},
"endpointUrl": "https://YOUR-N8N-HOST/mcp/dr-firas-mcp-calendar"
},
"typeVersion": 1.4
},
{
"id": "a0c1e161-4ada-41be-ab91-f9d39a1232a5",
"name": "Gmail MCP Client",
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"position": [
464,
208
],
"parameters": {
"options": {},
"endpointUrl": "https://YOUR-N8N-HOST/mcp/dr-firas-mcp-gmail"
},
"typeVersion": 1.4
},
{
"id": "b4b78fa2-499e-4e18-95dd-da47dabde001",
"name": "Utilities MCP Client",
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"position": [
592,
272
],
"parameters": {
"options": {},
"endpointUrl": "https://YOUR-N8N-HOST/mcp/dr-firas-mcp-utilities"
},
"typeVersion": 1.4
},
{
"id": "b4b934b3-50be-41ab-b662-c8e2841252ab",
"name": "Calendar MCP Server",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"position": [
1200,
-224
],
"parameters": {
"path": "dr-firas-mcp-calendar"
},
"typeVersion": 2
},
{
"id": "38b4f152-0e08-4b04-b4e3-f9fa5ab56ea4",
"name": "Search events",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
992,
-64
],
"parameters": {
"limit": 20,
"options": {},
"timeMax": "={{ $fromAI(\"before\", \"End of the time window, ISO 8601\", \"string\") }}",
"timeMin": "={{ $fromAI(\"after\", \"Start of the time window, ISO 8601\", \"string\") }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": ""
},
"operation": "getAll"
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "4332b3f2-476e-4dde-b707-3ce518b9227c",
"name": "Create event",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1120,
-64
],
"parameters": {
"end": "={{ $fromAI(\"end\", \"Event end datetime, ISO 8601\", \"string\") }}",
"start": "={{ $fromAI(\"start\", \"Event start datetime, ISO 8601\", \"string\") }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": ""
},
"additionalFields": {
"summary": "={{ $fromAI(\"title\", \"Event title\", \"string\") }}",
"description": "={{ $fromAI(\"description\", \"Event description\", \"string\") }}"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "6dcf8e89-0aec-47ab-bd20-f2ce1d09702c",
"name": "Update event",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1264,
-64
],
"parameters": {
"eventId": "={{ $fromAI(\"event_id\", \"ID of the event to update\", \"string\") }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": ""
},
"operation": "update",
"updateFields": {
"end": "={{ $fromAI(\"end\", \"New end datetime, ISO 8601 (optional)\", \"string\") }}",
"start": "={{ $fromAI(\"start\", \"New start datetime, ISO 8601 (optional)\", \"string\") }}",
"summary": "={{ $fromAI(\"title\", \"New event title (optional)\", \"string\") }}",
"description": "={{ $fromAI(\"description\", \"New event description (optional)\", \"string\") }}"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "e8ab4175-69d8-4f03-98a8-31860279ccbc",
"name": "Delete event",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1408,
-64
],
"parameters": {
"eventId": "={{ $fromAI(\"event_id\", \"ID of the event to delete\", \"string\") }}",
"options": {},
"calendar": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultName": ""
},
"operation": "delete"
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "beb92b60-09b8-4a41-9cef-9cb29cd6193c",
"name": "Gmail MCP Server",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"position": [
1120,
304
],
"parameters": {
"path": "dr-firas-mcp-gmail"
},
"typeVersion": 2
},
{
"id": "1a32e7ef-c087-4b2d-8b23-9801ec721033",
"name": "Search emails",
"type": "n8n-nodes-base.gmailTool",
"position": [
1008,
448
],
"parameters": {
"limit": 10,
"filters": {
"q": "={{ $fromAI(\"query\", \"Gmail search query, e.g. from:john is:unread\", \"string\") }}"
},
"operation": "getAll"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "db9f2502-41b8-4595-9637-2bf00b820841",
"name": "Create draft reply",
"type": "n8n-nodes-base.gmailTool",
"position": [
1168,
448
],
"parameters": {
"message": "={{ $fromAI(\"body\", \"Email body\", \"string\") }}",
"options": {
"sendTo": "={{ $fromAI(\"to\", \"Recipient email address\", \"string\") }}"
},
"subject": "={{ $fromAI(\"subject\", \"Email subject\", \"string\") }}",
"resource": "draft"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "dba1848e-d3e6-48e1-9e23-9d8512973efd",
"name": "Utilities MCP Server",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"position": [
1104,
784
],
"parameters": {
"path": "dr-firas-mcp-utilities"
},
"typeVersion": 2
},
{
"id": "ac61d8cf-644b-4e8b-ab8b-f6a8df8fbb8b",
"name": "Get current weather",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
992,
928
],
"parameters": {
"url": "=https://wttr.in/{{ $fromAI(\"location\", \"City or place name, e.g. Marrakesh\", \"string\") }}?format=4",
"options": {},
"responseType": "text",
"toolDescription": "Get the current weather and a short forecast for a city or place. Provide the location name.",
"optimizeResponse": true
},
"typeVersion": 4.4
},
{
"id": "fa0fda87-d3b8-46d6-9d8e-e2da772cb761",
"name": "Convert currency",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1152,
928
],
"parameters": {
"url": "=https://api.frankfurter.app/latest?amount={{ $fromAI(\"amount\", \"Amount to convert, e.g. 100\", \"number\") }}&from={{ $fromAI(\"from\", \"Source 3-letter ISO code, e.g. USD\", \"string\") }}&to={{ $fromAI(\"to\", \"Target 3-letter ISO code, e.g. EUR\", \"string\") }}",
"options": {},
"toolDescription": "Convert an amount from one currency to another using live exchange rates. Provide amount, from and to (3-letter ISO codes).",
"optimizeResponse": true
},
"typeVersion": 4.4
},
{
"id": "b80b5d88-dc13-422f-908f-a62da90712cc",
"name": "Calculator",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
1312,
928
],
"parameters": {},
"typeVersion": 1
},
{
"id": "52d81e21-2dac-415d-80ff-f74e2489a7d5",
"name": "Sticky Main",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1168,
-672
],
"parameters": {
"color": 4,
"width": 720,
"height": 2092,
"content": "# Build an MCP server and client AI assistant in n8n\n\n# \ud83d\udce5 [Open full documentation on Notion](https://automatisation.notion.site/Course-Build-an-MCP-server-and-client-AI-assistant-in-n8n-39d3d6550fd981c886b2ca8e77d27487)\n\nOne AI Assistant (the MCP **Client**) talks to three MCP **Servers** \u2014 Calendar, Gmail and Utilities \u2014 each exposing its own tools. Change a tool on a server and the client stays in sync automatically. No API key needed for weather or currency.\n\n## How it works\n- **When chat message received** starts a conversation.\n- **Configuration** holds the model, memory window and the assistant persona \u2014 the only place a beginner edits.\n- **AI Assistant (MCP Client)** connects to the 3 MCP servers through MCP Client tools and decides which tool to call.\n- **Calendar MCP Server** exposes native Google Calendar tools (search / create / update / delete).\n- **Gmail MCP Server** searches emails and prepares **draft** replies \u2014 it never sends on its own.\n- **Utilities MCP Server** exposes keyless tools: current weather (wttr.in), currency conversion (frankfurter.app) and a calculator.\n\n## Setup\n1. Add credentials: OpenAI, Google Calendar (OAuth2), Gmail (OAuth2).\n2. In the **Configuration** node, pick your model and adjust the persona if you want.\n3. In each **MCP Server Trigger**, the Path is prefilled \u2014 open it and copy its **Production URL**.\n4. **Activate** the workflow (the MCP servers only expose their URL when active).\n5. Paste each server's Production URL into the matching **MCP Client** node (Endpoint field).\n6. In the Calendar tools, choose your calendar; in Gmail, choose your alias if needed.\n7. Open the chat and try:\n - What's on my calendar this week?\n - Draft a reply to the last email from John.\n - What's the weather in Marrakesh?\n - Convert 100 USD to EUR.\n\n## Requirements\n- n8n self-hosted or Cloud with the **MCP Server Trigger v2** node (keep n8n updated).\n- OpenAI credential (chat model).\n- Google Calendar OAuth2 credential.\n- Gmail OAuth2 credential.\n- The workflow must stay **active** for the MCP servers to work.\n- No key needed for weather / currency (free public APIs).\n\n## Customization\n- Change the model or the persona in **Configuration**.\n- Add a tool to any server: drag a tool node onto its MCP Server Trigger \u2014 the client picks it up automatically.\n- **Security (optional):** for private use, set Authentication to **Bearer** on each MCP Server Trigger and the matching MCP Client, and create one Bearer Auth credential shared by both.\n\n---\n\nNeed help customizing?\nContact me for consulting and support : [Linkedin](https://www.linkedin.com/in/doctor-firass/)\n\n# MY NEW YOUTUBE CHANNEL\n\ud83d\udc49 [Subscribe to my new YouTube channel](https://www.youtube.com/@DrFiras_AI). Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.\n\n[](https://www.youtube.com/@DrFiras_AI)"
},
"typeVersion": 1
},
{
"id": "c69e4814-06e2-41af-a6b3-9b2a045cc412",
"name": "Sticky Client",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-128
],
"parameters": {
"color": 7,
"width": 1120,
"height": 520,
"content": "## AI Assistant \u2014 MCP Client\nChat \u2192 Configuration \u2192 Agent. The agent reaches the 3 MCP servers (on the right) through MCP Client tools. Model, memory window and the persona all live in the **Configuration** node."
},
"typeVersion": 1
},
{
"id": "defcc8b9-ac44-4542-a214-b5969b8893c2",
"name": "Sticky Version",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-544
],
"parameters": {
"color": 5,
"width": 600,
"height": 150,
"content": "## Requires MCP Server Trigger v2 \u00b7 activate before use\nUse a recent n8n (self-hosted or Cloud). Activate the workflow, then paste each server's **Production URL** into its MCP Client node."
},
"typeVersion": 1
},
{
"id": "a56b27a0-6374-4985-bdc0-b81444b35b49",
"name": "Sticky Calendar",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-368
],
"parameters": {
"color": 7,
"width": 600,
"height": 470,
"content": "## Calendar MCP Server\nNative Google Calendar tools exposed as one MCP server: search, create, update and delete events."
},
"typeVersion": 1
},
{
"id": "7eddb332-fe53-4761-9732-a31030bf1706",
"name": "Sticky Gmail",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
160
],
"parameters": {
"color": 7,
"width": 400,
"height": 470,
"content": "## Gmail MCP Server\nSearch emails and prepare **draft** replies. The assistant never sends email by itself."
},
"typeVersion": 1
},
{
"id": "4d84dc03-19f5-42bf-9bd0-823c8211110d",
"name": "Sticky Utilities",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
640
],
"parameters": {
"color": 7,
"width": 540,
"height": 470,
"content": "## Utilities MCP Server\nKeyless tools \u2014 current weather (wttr.in), currency conversion (frankfurter.app) and a calculator. No API key required."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": true,
"executionOrder": "v1"
},
"versionId": "e448faf8-5cb2-4742-873c-5984f2b7ae43",
"nodeGroups": [],
"connections": {
"Calculator": {
"ai_tool": [
[
{
"node": "Utilities MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create event": {
"ai_tool": [
[
{
"node": "Calendar MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Delete event": {
"ai_tool": [
[
{
"node": "Calendar MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Update event": {
"ai_tool": [
[
{
"node": "Calendar MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Configuration": {
"main": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "main",
"index": 0
}
]
]
},
"Search emails": {
"ai_tool": [
[
{
"node": "Gmail MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Search events": {
"ai_tool": [
[
{
"node": "Calendar MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "ai_memory",
"index": 0
}
]
]
},
"Convert currency": {
"ai_tool": [
[
{
"node": "Utilities MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Gmail MCP Client": {
"ai_tool": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Create draft reply": {
"ai_tool": [
[
{
"node": "Gmail MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Calendar MCP Client": {
"ai_tool": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get current weather": {
"ai_tool": [
[
{
"node": "Utilities MCP Server",
"type": "ai_tool",
"index": 0
}
]
]
},
"Utilities MCP Client": {
"ai_tool": [
[
{
"node": "AI Assistant (MCP Client)",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Configuration",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
gmailOAuth2googleCalendarOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow runs a chat-based OpenAI assistant in n8n that calls three MCP servers for Google Calendar management, Gmail search and draft replies, and utility tools for weather, currency conversion, and calculations. Receives a chat message in n8n to start or continue a…
Source: https://n8n.io/workflows/17218/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n workflow is designed for Shopify store owners and e-commerce managers who want to automate their store operations through an intelligent AI assistant. The workflow creates a conversational in
This workflow implements an advanced AI-powered system for generating, and executing Claude Skills stored on GitHub.
Think Tool. Uses stickyNote, agent, googleCalendarTool, memoryBufferWindow. Chat trigger; 28 nodes.
Description: Turn your WooCommerce store into a conversational AI assistant — create products, place orders, run reports and manage coupons using natural language via n8n + an MCP Server.
This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n.