This workflow corresponds to n8n.io template #13905 — 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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "9d77144c-2211-4c53-a494-eb208a5dc7a5",
"name": "\u2b50 Main Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1216,
-400
],
"parameters": {
"width": 548,
"height": 496,
"content": "# \ud83d\uddd3\ufe0f BytezTech Appointment Bot\n\n## How it works\nTwo parallel flows run independently:\n1. **AI Chat Flow** \u2014 clients message the bot to book, reschedule, or cancel meetings. The agent checks Google Calendar availability, creates/updates/deletes events, and sends Gmail confirmations automatically.\n2. **Daily Sync Flow** \u2014 every morning at 9:30 AM IST, today's calendar events are cleared from the sheet, re-fetched, formatted, and re-inserted. An admin summary email is then sent.\n\n## Setup steps\n1. Add **Google Calendar OAuth** credential (jigneshmevada87@gmail.com)\n2. Add **Gmail OAuth** credential for agent tool + admin report node\n3. Add **Google Sheets OAuth** for Clear node; **Service Account** for Insert node\n4. Add **Groq API** key for the LLaMA 4 Scout language model\n5. **Activate** the workflow \u2014 both flows will run independently"
},
"typeVersion": 1
},
{
"id": "116e4a5c-1a69-47a5-a0ce-467aa7ef2f15",
"name": "Group: AI Chat Flow",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
-592
],
"parameters": {
"color": 7,
"width": 1364,
"height": 564,
"content": "## \ud83e\udd16 AI Chat Agent Flow\nClient sends a chat message \u2192 AI Agent (Groq LLaMA 4) processes the request using session memory and 5 Calendar/Gmail tools. Handles booking, rescheduling, and cancellation end-to-end."
},
"typeVersion": 1
},
{
"id": "2ac902ea-b3c6-4428-ba1c-0f589b632fa6",
"name": "Group: Daily Sheet Sync",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
16
],
"parameters": {
"color": 7,
"width": 1424,
"height": 452,
"content": "## \ud83d\udcca Daily Sheet Sync Flow\nScheduled at 9:30 AM IST daily. Clears yesterday's sheet rows, fetches today's Google Calendar events, formats each event, inserts into Sheets, then emails the admin a count summary with sheet link."
},
"typeVersion": 1
},
{
"id": "671a89a2-7816-4caf-90fd-8ca3bf9e6132",
"name": "Clint Chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-560,
-480
],
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "ab93e552-3075-4ef5-b030-788853fa2e1b",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-32,
-480
],
"parameters": {
"options": {
"systemMessage": "You are an intelligent scheduling assistant for BytezTech, Co-Founder Chintan.\nYour purpose is to manage BytezTech's calendar professionally and efficiently through chat communication.\n\n\ud83c\udfaf CORE RESPONSIBILITIES\n\u2022 Appointment Booking\n\u2022 Rescheduling (date and/or time changes)\n\u2022 Cancellation (complete removal)\n\u2022 Meeting Details Retrieval\n\n\ud83d\udd70\ufe0f TIMEZONE POLICY\n\u2022 ALL appointments MUST be scheduled in IST (GMT+05:30)\n\u2022 Always confirm times in IST format before scheduling\n\n\ud83d\udccb BOOKING FLOW\n1. Collect: Full name, email, purpose, date, time (IST), duration (default 30min)\n2. Check availability via Get many events\n3. Create event in ISO 8601 format: YYYY-MM-DDTHH:mm:ss+05:30\n4. Add attendee email to event\n5. Send Gmail confirmation to attendee\n\n\ud83d\udccb RESCHEDULE FLOW (ANY date/time change = UPDATE, never delete)\n1. Get current Event_ID via Get many events\n2. Check new slot availability\n3. Update event with new start/end times\n4. Send reschedule notification via Gmail\n\n\ud83d\udccb CANCELLATION FLOW (Only on explicit cancel/delete/remove request)\n1. Confirm intent with user\n2. Get Event_ID\n3. Delete event\n4. Send cancellation email\n\n\ud83d\udcc5 ISO 8601 FORMAT (MANDATORY)\nExample: 2024-12-16T14:30:00+05:30\n\n\u26a0\ufe0f ERROR HANDLING\n\u2022 Missing email \u2192 Ask before proceeding\n\u2022 Slot unavailable \u2192 Suggest 3 alternatives\n\u2022 Ambiguous (change vs cancel) \u2192 Ask to clarify\n\nRepresent BytezTech professionally at all times."
}
},
"typeVersion": 2.2
},
{
"id": "d004c824-595f-495a-9ad1-f9b5fe13dd3f",
"name": "Groq Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
-336,
-256
],
"parameters": {
"model": "meta-llama/llama-4-scout-17b-16e-instruct",
"options": {}
},
"credentials": {
"groqApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "1e5fb7f5-529a-4219-8b78-53616257e1a4",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-208,
-256
],
"parameters": {
"sessionKey": "={{ $json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 50
},
"typeVersion": 1.3
},
{
"id": "b454d3ac-f03a-49ef-98d2-ca33b88c7589",
"name": "Create an event in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
-80,
-256
],
"parameters": {
"end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
"start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com",
"cachedResultName": "user@example.com"
},
"additionalFields": {
"summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}",
"location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}",
"attendees": [
"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('attendees0_Attendees', ``, 'string') }}"
],
"description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "090d0624-6a27-45b9-ba1c-8164344b2f28",
"name": "Get many events in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
64,
-256
],
"parameters": {
"options": {},
"timeMax": "={{ $fromAI('Before', ``, 'string') }}",
"timeMin": "={{ $fromAI('After', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com",
"cachedResultName": "user@example.com"
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "b2845da6-618e-460a-90f5-f6c7c15cd963",
"name": "Delete an event in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
192,
-256
],
"parameters": {
"eventId": "={{ $fromAI('Event_ID', ``, 'string') }}",
"options": {},
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com",
"cachedResultName": "user@example.com"
},
"operation": "delete"
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "ff6461d7-7810-46f9-bf47-8e5090f9570a",
"name": "Update an event in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
320,
-256
],
"parameters": {
"eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com"
},
"operation": "update",
"updateFields": {
"end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
"start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
"location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "7700f47c-0f58-496d-ac72-a49382bad973",
"name": "Send a message in Gmail",
"type": "n8n-nodes-base.gmailTool",
"position": [
448,
-256
],
"parameters": {
"sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {},
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "aaa95646-57bb-4c1c-a098-fa10f8263567",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-560,
208
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9,
"triggerAtMinute": 30
}
]
}
},
"typeVersion": 1
},
{
"id": "3e53c7f4-cddd-4c37-bf61-42abdd5d389a",
"name": "Clear Old Appointments",
"type": "n8n-nodes-base.googleSheets",
"position": [
-336,
208
],
"parameters": {
"operation": "clear",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk/edit?usp=drivesdk",
"cachedResultName": "Apponitment Booking"
},
"keepFirstRow": true
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "0474dd9e-37e8-483e-bd85-120b0be43e0e",
"name": "Get Today Events",
"type": "n8n-nodes-base.googleCalendar",
"position": [
-112,
208
],
"settings": {
"alwaysOutputData": true
},
"parameters": {
"options": {},
"timeMax": "={{ $now.setZone('Asia/Kolkata').endOf('day').toISO() }}",
"timeMin": "={{ $now.setZone('Asia/Kolkata').startOf('day').toISO() }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "user@example.com"
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "a88400b8-9743-4721-94a8-285959e85835",
"name": "IF Has Events",
"type": "n8n-nodes-base.if",
"position": [
128,
112
],
"parameters": {
"options": {},
"conditions": {
"string": [
{
"value1": "={{ $json.id }}",
"operation": "isNotEmpty"
}
]
}
},
"typeVersion": 2
},
{
"id": "05b3b967-ef65-4a44-a045-7c96abbd5cbf",
"name": "Format Event Data",
"type": "n8n-nodes-base.set",
"position": [
352,
96
],
"parameters": {
"values": {
"string": [
{
"name": "ID",
"value": "={{ $json.id || ($now.setZone('Asia/Kolkata').toFormat('yyyyMMdd-HHmmss') + '-' + $itemIndex) }}"
},
{
"name": "Full Name",
"value": "={{ $json.summary || $json.extendedProperties?.private?.fullName || 'N/A' }}"
},
{
"name": "Email",
"value": "={{ ($json.attendees && $json.attendees.length) ? $json.attendees.map(a => a.email).filter(Boolean).join(', ') : 'N/A' }}"
},
{
"name": "Purpose",
"value": "={{ $json.description || $json.summary || 'Meeting' }}"
},
{
"name": "Date (IST)",
"value": "={{ $json.start?.dateTime ? DateTime.fromISO($json.start.dateTime).setZone('Asia/Kolkata').toFormat('yyyy-MM-dd') : ($json.start?.date || $now.setZone('Asia/Kolkata').toFormat('yyyy-MM-dd')) }}"
},
{
"name": "Start Time (IST)",
"value": "={{ $json.start?.dateTime ? DateTime.fromISO($json.start.dateTime).setZone('Asia/Kolkata').toFormat('HH:mm') : 'All Day' }}"
},
{
"name": "End Time (IST)",
"value": "={{ $json.end?.dateTime ? DateTime.fromISO($json.end.dateTime).setZone('Asia/Kolkata').toFormat('HH:mm') : 'All Day' }}"
},
{
"name": "Duration",
"value": "={{ ($json.start?.dateTime && $json.end?.dateTime) ? (Math.max(1, Math.round(DateTime.fromISO($json.end.dateTime).diff(DateTime.fromISO($json.start.dateTime), 'minutes').minutes)) + ' minutes') : 'All day' }}"
},
{
"name": "Status",
"value": "Confirmed"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 2
},
{
"id": "3cb4eaa7-de26-40e1-8f6a-76a10cdb6ab9",
"name": "Insert Events Details",
"type": "n8n-nodes-base.googleSheets",
"position": [
576,
96
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $json.ID }}",
"Email": "={{ $json.Email }}",
"Status": "={{ $json.Status }}",
"Purpose": "={{ $json.Purpose }}",
"Duration": "={{ $json.Duration }}",
"Full Name": "={{ $json['Full Name'] }}",
"Date (IST)": "={{ $json['Date (IST)'] }}",
"End Time (IST)": "={{ $json['End Time (IST)'] }}",
"Start Time (IST)": "={{ $json['Start Time (IST)'] }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Full Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Full Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Purpose",
"type": "string",
"display": true,
"required": false,
"displayName": "Purpose",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date (IST)",
"type": "string",
"display": true,
"required": false,
"displayName": "Date (IST)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Start Time (IST)",
"type": "string",
"display": true,
"required": false,
"displayName": "Start Time (IST)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "End Time (IST)",
"type": "string",
"display": true,
"required": false,
"displayName": "End Time (IST)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Duration",
"type": "string",
"display": true,
"required": false,
"displayName": "Duration",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "Sheet1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk/edit?usp=drivesdk",
"cachedResultName": "Apponitment Booking"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "33593fe3-96db-4e6b-a0a5-cc6cd282cb66",
"name": "Build Daily Summary",
"type": "n8n-nodes-base.code",
"position": [
128,
304
],
"parameters": {
"jsCode": "const count = items.filter(i => i.json && i.json.id).length;\nreturn [\n {\n json: {\n count,\n reportDate: $now.setZone('Asia/Kolkata').toFormat('dd/MM/yyyy'),\n sheetUrl: 'https://docs.google.com/spreadsheets/d/1X5KnR2bwuy4_mmD0Imw6k6fA7Bk91Drrr4jngz_IYkk/edit#gid=0'\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "2781fb58-0761-4af7-a944-287939aafaee",
"name": "Send Email to Admin",
"type": "n8n-nodes-base.gmail",
"position": [
352,
304
],
"parameters": {
"sendTo": "user@example.com",
"message": "Good morning!\\n\\nHere's today's meeting schedule summary (IST):\\n\\nTotal Meetings: {{ $json.count }}\\n\\nSheet link: {{ $json.sheetUrl }}\\n\\nBest regards,\\nAppointment Bot",
"options": {},
"subject": "\ud83d\udcc5 Daily Meeting Report - {{ $json.reportDate }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
}
],
"connections": {
"Clint Chat": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"IF Has Events": {
"main": [
[
{
"node": "Format Event Data",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Groq Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get Today Events": {
"main": [
[
{
"node": "IF Has Events",
"type": "main",
"index": 0
},
{
"node": "Build Daily Summary",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Clear Old Appointments",
"type": "main",
"index": 0
}
]
]
},
"Format Event Data": {
"main": [
[
{
"node": "Insert Events Details",
"type": "main",
"index": 0
}
]
]
},
"Build Daily Summary": {
"main": [
[
{
"node": "Send Email to Admin",
"type": "main",
"index": 0
}
]
]
},
"Clear Old Appointments": {
"main": [
[
{
"node": "Get Today Events",
"type": "main",
"index": 0
}
]
]
},
"Send a message in Gmail": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create an event in Google Calendar": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Delete an event in Google Calendar": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get many events in Google Calendar": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Update an event in Google Calendar": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"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.
gmailOAuth2googleApigoogleCalendarOAuth2ApigoogleSheetsOAuth2ApigroqApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
📌 Overview This workflow automates end-to-end appointment scheduling for your business using an AI-powered chatbot. Clients can book, reschedule, or cancel meetings through a simple chat interface — no manual coordination needed.
Source: https://n8n.io/workflows/13905/ — 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.
Overview Meet Maria, a sophisticated AI Booking Agent designed for Veterinary Clinics (but easily adaptable to any service business). This workflow transforms a simple chat interface into a full-scale
This n8n template demonstrates how to build an AI-powered Market Research Assistant using a multi-agent workflow. It helps you get a 360-degree view of a product idea or research topic by analysing: C
Think Tool. Uses stickyNote, agent, googleCalendarTool, memoryBufferWindow. Chat trigger; 28 nodes.
teste. Uses chatTrigger, agent, lmChatGroq, memoryBufferWindow. Chat trigger; 24 nodes.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.