This workflow corresponds to n8n.io template #8109 — we link there as the canonical source.
This workflow follows the Agent → Gmail 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": "86qWVU9iA1LQM3pC",
"name": "Daily Email & Calendar Summaries to Slack with Gemini AI & Google Workspace",
"tags": [],
"nodes": [
{
"id": "766a5fc5-00d7-4874-ac0d-c3727476a708",
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
-1216,
-96
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 8
}
]
}
},
"typeVersion": 1
},
{
"id": "83f5136b-f441-4419-b31e-9c7e31705777",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
576,
-176
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "4339797c-3b99-41a2-b66d-d41b604a7efc",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
576,
256
],
"parameters": {
"text": "=You are an assistant that summarizes calendar data clearly. \n\n### Task\n1. Summarize the calendar events. \n - Use the format: [Date | Time] \u2192 [Event Title] \u2013 [Short Notes/Details]. \n\n### Formatting Rules\n- Each summary should be on a new line with no markdown symbols. \n- Maximum of 5 sentences and minimum of 1 sentence. \n- Add a prefix and suffix star for the heading Calendar. \n- Do not include links in the emails. \n\nSummary: \n\n### Example Output\n*Calendar Summary:* \n2025-08-26 | 10:00 AM - 10:30 AM \u2192 Team Standup \u2013 Daily sync-up \n2025-08-26 | 12:00 PM - 12:30 PM \u2192 Team Standup \u2013 n8n meeting ",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "44707b49-2c51-4295-b1b5-431199ceacc9",
"name": "Get many events in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
688,
448
],
"parameters": {
"options": {},
"timeMax": "={{$today.plus({days: 1}).toISO()}}",
"timeMin": "={{$today.toISO()}}",
"calendar": {
"__rl": true,
"mode": "id",
"value": ""
},
"operation": "getAll"
},
"typeVersion": 1.3
},
{
"id": "cee7ac7f-54ef-4240-a87f-755ae7bc8407",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
640,
-336
],
"parameters": {
"text": "=You are an assistant that summarizes email messages from the provided JSON array {{ $json.text }}.\n\nInstructions:\n- For each email in the array, generate a summary in exactly 3 sentences.\n- Each summary must include:\n \u2022 Sender (from the \"{{ $json.from.value[0].name }}\" field)\n \u2022 Subject (from the \"{{ $json.subject }}\" field)\n \u2022 Brief summary of the \"{{ $json.text }}\" content \n- Do not use bullet points or markdown. \n- Keep the tone professional and concise, suitable for sending to Slack. \n- Output summaries one after another, separated by a blank line.\n- Send this as Json\n{\n\"from\":\"[sender email]\"\n\"subject\": \"[subject line]\"\n\"summary\":\"[3 sentence summary]\"\n}\n\n\nDon't use \\n should send in a format that can parse as json using JavaScript or Python",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "7cd241f5-05b8-4fcd-a0fb-941a1db50c78",
"name": "Get weekly unread emails",
"type": "n8n-nodes-base.gmail",
"position": [
-720,
-336
],
"parameters": {
"limit": 100,
"simple": false,
"filters": {
"labelIds": [
"INBOX"
],
"readStatus": "unread",
"receivedAfter": "={{ $today.minus({ days: 7 }).toISODate() }}"
},
"options": {},
"operation": "getAll"
},
"typeVersion": 2.1
},
{
"id": "bcd7209d-94a7-4fbb-9b3c-dc54d6572cc3",
"name": "Get Names, emails and subject",
"type": "n8n-nodes-base.googleSheets",
"position": [
-464,
-336
],
"parameters": {
"sheetName": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "",
"cachedResultName": ""
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "="
}
},
"executeOnce": true,
"typeVersion": 4.7
},
{
"id": "783b5790-812d-4688-9a49-b8e7f77ae24c",
"name": "Restructure the data from spread sheet",
"type": "n8n-nodes-base.code",
"position": [
-48,
-336
],
"parameters": {
"jsCode": "const items = $input.all().map(i => i.json);\n\nconst result = {\n emails: [],\n name: [],\n subjects: []\n};\n\nfor (const row of items) {\n if (row.Email && row.Email.trim() !== \"\") {\n result.emails.push(row.Email);\n }\n if (row.Name && row.Name.trim() !== \"\") {\n result.name.push(row.Name);\n }\n if (row.Subject && row.Subject.trim() !== \"\") {\n result.subjects.push(row.Subject);\n }\n}\n\n// Return as array of one item\nreturn [{ json: result }];\n"
},
"executeOnce": true,
"typeVersion": 2
},
{
"id": "1bc739a9-0082-417a-b60e-88069bc2742c",
"name": "Filter the emails",
"type": "n8n-nodes-base.code",
"position": [
208,
-336
],
"parameters": {
"jsCode": "const emails = $input.first().json.emails; // list of blocked emails\nconst subjects = $input.first().json.subjects;\nconst names = $input.first().json.name;// list of blocked subjects\n\nreturn $('Get weekly unread emails').all().filter(item => {\n const email = item.json.from.value[0].address; \n const subject = item.json.subject; \n const name = item.json.from.value[0].name; \n\n return emails.includes(email) || subjects.includes(subject) ||names.includes(name) ;\n});"
},
"typeVersion": 2
},
{
"id": "a809c2be-4563-48fe-b096-2126d67dbde0",
"name": "Restructure the code from the AI agent",
"type": "n8n-nodes-base.code",
"position": [
960,
-336
],
"parameters": {
"jsCode": "// Get all input items\nlet items = $input.all();\n\n// Initialize Slack blocks\nlet blocks = [];\n\nfor (let item of items) {\n let raw = item.json.output; // raw string with ```json ... ```\n\n // Clean backticks and parse\n let cleaned = raw.replace(/```json\\n?/, \"\").replace(/```$/, \"\");\n let parsed = JSON.parse(cleaned);\n\n // Add Slack blocks\n blocks.push({ type: \"divider\" });\n blocks.push({\n type: \"section\",\n text: {\n type: \"mrkdwn\",\n text: `*${parsed.from}*\\n*${parsed.subject}*\\n${parsed.summary}`\n }\n });\n}\n\n// Return one Slack message with all blocks\nreturn [\n {\n json: {\n blocks: blocks\n }\n }\n];\n"
},
"executeOnce": false,
"typeVersion": 2
},
{
"id": "20bd2254-88a0-4238-ad91-fcd6708b9def",
"name": "Restructure the code from AI agent",
"type": "n8n-nodes-base.code",
"position": [
992,
256
],
"parameters": {
"jsCode": "// Get all input items\nlet items = $input.all();\n\n// Initialize Slack blocks\nlet blocks = [];\n\nfor (let item of items) {\n let text = item.json.output;\n\n blocks.push({ type: \"divider\" });\n blocks.push({\n type: \"section\",\n text: {\n type: \"mrkdwn\",\n text: `${text}`\n }\n });\n}\n\nreturn [\n {\n json: {\n blocks: blocks\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "e6c0ad9c-0da5-4e59-bfdf-7f8381e1f241",
"name": "Append mails and events ",
"type": "n8n-nodes-base.merge",
"position": [
1552,
-48
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "9ad25b6a-fe2e-487c-a232-bdd36585ae8b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-432
],
"parameters": {
"color": 3,
"width": 544,
"height": 288,
"content": "## Get the unread emails for the past one week\n\n"
},
"typeVersion": 1
},
{
"id": "50ae9ce1-1bc5-42bd-bbe0-a16fd1c513d0",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-480
],
"parameters": {
"width": 576,
"height": 336,
"content": "## Filter out emails based on Name, Email, Subject\n**Users can configure the name, email and subject in the Excel sheet. Emails will then be filtered based on these parameters, allowing users to retrieve only the emails they need.** "
},
"typeVersion": 1
},
{
"id": "0fe896b9-abe0-4134-b285-838206b9bb37",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
-480
],
"parameters": {
"width": 608,
"height": 464,
"content": "\n## Summarizing emails\n**Emails are summarized using an AI agent. The agent reads each email individually, generates a concise summary with Gemini AI, and restructures the output to seamlessly merge with event data.** "
},
"typeVersion": 1
},
{
"id": "2a4fe129-be9f-4e12-8379-ca6ba058e9e9",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
80
],
"parameters": {
"color": 4,
"width": 704,
"height": 496,
"content": "\n## Summarizing Events\n**Read Google calendar and get events for the data and summarize it and restructure t**"
},
"typeVersion": 1
},
{
"id": "57547082-e53f-4372-8f48-24dba3f768bf",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1456,
-224
],
"parameters": {
"color": 6,
"width": 688,
"height": 400,
"content": "## Send the event summary and Email summary to slack\n"
},
"typeVersion": 1
},
{
"id": "b595b001-08cf-4497-a5aa-afd3bba4d496",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1824,
-928
],
"parameters": {
"width": 592,
"height": 576,
"content": "## \ud83d\udce9 Daily Email & \ud83d\uddd3\ufe0f Calendar Summary \u2192 \ud83d\udce2 Slack Notification System\n\n\n\n\n**What it does** \n- Reads unread emails from the last 7 days.\n- Retrieves events from calendar for the current day.\n- Filters emails based on **Name, Email, and Subject** \n- Pulls Name, Email, and Subject from Google Sheets. \n- Summarizes emails and events using an AI model.\n- Sends a Slack notification to a designated channel every morning.\n\n**Requirements** \n- Google Sheet with columns: **Name, Email, Subject**. \n- Gmail account to fetch unread emails.\n- Gemini AI model to summarize the data.\n- Slack with a dedicated channel to receive notifications.\n\n**Setup Instructions** \n- Create a Google Sheet with the required columns (**Name, Email, Subject**).\n- Set up Google Sheets and Gmail credentials.\n- Replace the sheet name and file name in the Google Sheets node. \n- Update email addresses in the notification nodes. \n- Set up Gemini with credentials.\n- Set up Slack with an API key and define the channel.\n"
},
"typeVersion": 1
},
{
"id": "09162e4b-5d61-420b-a906-475ab749f6e3",
"name": "Send a message",
"type": "n8n-nodes-base.slack",
"position": [
1952,
-48
],
"parameters": {
"select": "channel",
"blocksUi": "={{ '{ \"blocks\": ' + JSON.stringify($json.blocks) + ' }' }}",
"channelId": {
"__rl": true,
"mode": "id",
"value": ""
},
"messageType": "block",
"otherOptions": {
"includeLinkToWorkflow": false
},
"authentication": "oAuth2"
},
"typeVersion": 2.3
},
{
"id": "20be74e9-31be-44f9-aca9-28db494ea197",
"name": "Restructure the code into slack block",
"type": "n8n-nodes-base.code",
"position": [
1760,
-48
],
"parameters": {
"jsCode": "const allInputs = $input.all();\n\nconst mergedBlocks = allInputs.flatMap(item => item.json.blocks || []);\n\nreturn {\n json: {\n blocks: mergedBlocks\n }\n};\n"
},
"executeOnce": false,
"typeVersion": 2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "5e78ad2b-6bb6-4432-b4ce-59cd0fa02804",
"connections": {
"Cron": {
"main": [
[
{
"node": "Get weekly unread emails",
"type": "main",
"index": 0
},
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Restructure the code from AI agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Restructure the code from the AI agent",
"type": "main",
"index": 0
}
]
]
},
"Filter the emails": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"Append mails and events ": {
"main": [
[
{
"node": "Restructure the code into slack block",
"type": "main",
"index": 0
}
]
]
},
"Get weekly unread emails": {
"main": [
[
{
"node": "Get Names, emails and subject",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get Names, emails and subject": {
"main": [
[
{
"node": "Restructure the data from spread sheet",
"type": "main",
"index": 0
}
]
]
},
"Get many events in Google Calendar": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Restructure the code from AI agent": {
"main": [
[
{
"node": "Append mails and events ",
"type": "main",
"index": 1
}
]
]
},
"Restructure the code into slack block": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Restructure the code from the AI agent": {
"main": [
[
{
"node": "Append mails and events ",
"type": "main",
"index": 0
}
]
]
},
"Restructure the data from spread sheet": {
"main": [
[
{
"node": "Filter the emails",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Here’s a workflow that automates daily Slack notifications with a concise summary of unread emails (from the last 7 days) and Google Calendar events (for the current day). It integrates Gmail, Google Sheets, Google Calendar, Gemini AI, and Slack to provide a clear snapshot of…
Source: https://n8n.io/workflows/8109/ — 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.
Created by: Peyton Leveillee Last updated: October 2025
The Multi-Model Agency Content Engine is a high-performance editorial system designed for agencies. It solves the "blank page" problem by alternating between real-world social proof and strategic expe
This template is for clinics, hospitals, care teams, and telemedicine providers who need a structured, automated system for post-surgery follow-up. It helps reduce manual workload while ensuring every
kisisel asistan. Uses toolWorkflow, toolHttpRequest, toolCalculator, toolThink. Scheduled trigger; 43 nodes.
This workflow is the AI analysis and alerting engine for a complete social media monitoring system. It's designed to work with data scraped from X (formerly Twitter) using a tool like the Apify Tweet