This workflow corresponds to n8n.io template #8119 — we link there as the canonical source.
This workflow follows the Error Trigger → 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": "xExUyHjRkpcuKuOY",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Weekly review",
"tags": [],
"nodes": [
{
"id": "9a585642-aab8-4da7-bdce-60af6ce468cb",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-64,
-144
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtHour": 23
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ad5e95ce-64d0-405d-bfff-fa17cc61ca7c",
"name": "Get a document",
"type": "n8n-nodes-base.googleDocs",
"position": [
160,
-144
],
"parameters": {
"operation": "get",
"documentURL": "https://docs.google.com/document/d/1XYhGMHOPCMdZJgOyhIa77_LpUmVceyp-HjpyEj6fv48/edit?tab=t.0"
},
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "weekly-filter-node",
"name": "Weekly Filter",
"type": "n8n-nodes-base.function",
"position": [
384,
-144
],
"parameters": {
"functionCode": "const documentText = $input.first().json.content;\nconst now = new Date();\nconst oneWeekAgo = new Date();\noneWeekAgo.setDate(oneWeekAgo.getDate() - 7);\n\n// Finde alle Eintr\u00e4ge mit Datum-Stamps (\ud83d\udcc5 DD.MM.YYYY, HH:MM)\nconst entryPattern = /\ud83d\udcc5\\s(\\d{2}\\.\\d{2}\\.\\d{4}),?\\s(\\d{2}:\\d{2})[\\s\\S]*?(?=\ud83d\udcc5|$)/g;\nconst weeklyEntries = [];\nlet match;\n\nwhile ((match = entryPattern.exec(documentText)) !== null) {\n const dateStr = match[1]; // DD.MM.YYYY\n const timeStr = match[2]; // HH:MM\n \n // Parse deutsches Datum\n const [day, month, year] = dateStr.split('.');\n const [hour, minute] = timeStr.split(':');\n const entryDate = new Date(year, month - 1, day, hour, minute);\n \n // Nur wenn innerhalb der letzten 7 Tage\n if (entryDate >= oneWeekAgo && entryDate <= now) {\n const entryText = match[0].trim();\n \n weeklyEntries.push({\n date: entryDate,\n dateStr: `${dateStr}, ${timeStr}`,\n content: entryText\n });\n }\n}\n\n// Sortiere chronologisch\nweeklyEntries.sort((a, b) => a.date - b.date);\n\n// Kombiniere f\u00fcr AI-Analyse\nconst weeklyText = weeklyEntries.map(entry => entry.content).join('\\n\\n---\\n\\n');\n\n// Kalendarwoche berechnen\nconst getWeekNumber = (date) => {\n const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n const dayNum = d.getUTCDay() || 7;\n d.setUTCDate(d.getUTCDate() + 4 - dayNum);\n const yearStart = new Date(Date.UTC(d.getUTCFullYear(),0,1));\n return Math.ceil((((d - yearStart) / 86400000) + 1)/7);\n};\n\nconst currentWeek = getWeekNumber(now);\n\nreturn [{\n json: {\n weeklyText: weeklyText,\n entryCount: weeklyEntries.length,\n weekNumber: currentWeek,\n dateRange: {\n from: oneWeekAgo.toLocaleDateString('de-CH'),\n to: now.toLocaleDateString('de-CH')\n },\n entries: weeklyEntries\n }\n}];"
},
"typeVersion": 1
},
{
"id": "ai-task-YOUR_OPENAI_KEY_HERE-node",
"name": "AI Task Extractor",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
608,
-144
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=Du analysierst die Audio- und Text-Notizen von Julian Reich aus der letzten Woche ({{ $json.entryCount }} Eintr\u00e4ge vom {{ $json.dateRange.from }} bis {{ $json.dateRange.to }}).\n\nExtrahiere strukturiert:\n\n## AUSGABE-FORMAT (exakt einhalten):\n\n**\ud83c\udfaf TASKS F\u00dcR N\u00c4CHSTE WOCHE:**\n- [ ] Task 1\n- [ ] Task 2\n- [ ] Task 3\n- [ ] Task 4\n- [ ] Task 5\n- etc.\n\n**\u23f0 DEADLINES & TERMINE:**\n- Datum: Aufgabe\n- Datum: Termin\n\n**\ud83d\udca1 WICHTIGE ERKENNTNISSE:**\n- Erkenntnis 1\n- Erkenntnis 2\n- Erkenntnis 3\n\n**\ud83d\udd25 TOP 3 PRIORIT\u00c4TEN:**\n1. Priorit\u00e4t 1\n2. Priorit\u00e4t 2\n3. Priorit\u00e4t 3\n\n**\ud83d\udcca KATEGORIEN-VERTEILUNG:**\n- Arbeit: X Eintr\u00e4ge\n- Privat: Y Eintr\u00e4ge\n- [weitere Kategorien]\n\n---\n\n## ZU ANALYSIERENDE EINTR\u00c4GE:\n{{ $json.weeklyText }}"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "ai-email-summary-node",
"name": "AI E-Mail Summary",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
960,
-144
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=Erstelle eine professionelle, aber pers\u00f6nliche E-Mail Zusammenfassung f\u00fcr Julian Reich basierend auf seinen Notizen der letzten Woche. Formatiere in HTML. Gib nur die E-Mail aus, ohne Kommentar wie \"Natur\u00fclich, hier die E-Mail in HTML\"\n\n## E-MAIL STRUKTUR:\n\n**Betreff:** \ud83d\udcca W\u00f6chentliche Zusammenfassung KW {{ $('Weekly Filter').first().json.weekNumber }}\n\n**Body:**\nLieber Julian,\n\nhier ist deine automatische Wochenzusammenfassung vom {{ new Date().toLocaleDateString('de-CH') }}:\n\n**\ud83d\udcc8 WOCHE IM \u00dcBERBLICK**\n[2-3 S\u00e4tze Zusammenfassung der Hauptthemen]\n\n**\u2705 POSITIVE ENTWICKLUNGEN**\n- Was gut gelaufen ist\n- Erfolge und Fortschritte\n\n**\ud83c\udfaf ACTIONABLES F\u00dcR N\u00c4CHSTE WOCHE**\n[Konkrete n\u00e4chste Schritte basierend auf den extrahierten Tasks]\n\n**\ud83d\udcca WOCHENSTATISTIK**\n- {{ $('Weekly Filter').first().json.entryCount }} Notizen aufgezeichnet\n- Zeitraum: {{ $('Weekly Filter').first().json.dateRange.from }} - {{ $('Weekly Filter').first().json.dateRange.to }}\n- Hauptkategorien: [aus der Analyse]\n\n**\ud83d\udca1 ERKENNTNISSE & MUSTER**\n[Wiederkehrende Themen, Verhaltensmuster, Empfehlungen]\n\n**\ud83d\udd17 ANHANG**\nDetaillierte Task-YOUR_OPENAI_KEY_HERE wurde in dein Google Doc eingef\u00fcgt.\n\nViele Gr\u00fcsse,\nDein pers\u00f6nlicher AI Review Agent \ud83e\udd16\n\n---\n\n## BASIS F\u00dcR DIE E-MAIL:\n\n**EXTRAHIERTE TASKS & INSIGHTS:**\n{{ $('AI Task Extractor').first().json.message.content }}\n\n**WOCHENDATEN:**\n- {{ $('Weekly Filter').first().json.entryCount }} Eintr\u00e4ge\n- KW {{ $('Weekly Filter').first().json.weekNumber }}\n- {{ $('Weekly Filter').first().json.dateRange.from }} bis {{ $('Weekly Filter').first().json.dateRange.to }} {{ $json.message.content }}"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "save-tasks-doc-node",
"name": "Tasks ins Doc speichern",
"type": "n8n-nodes-base.googleDocs",
"position": [
1312,
-144
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ '\\n\\n' + '='.repeat(50) + '\\n\ud83d\udcca W\u00d6CHENTLICHE ZUSAMMENFASSUNG - KW ' + $('Weekly Filter').first().json.weekNumber + ' (' + new Date().toLocaleDateString('de-CH') + ')\\n' + '='.repeat(50) + '\\n\\n' + $('AI Task Extractor').first().json.message.content }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "https://docs.google.com/document/d/1XYhGMHOPCMdZJgOyhIa77_LpUmVceyp-HjpyEj6fv48/edit?tab=t.0"
},
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "telegram-notification-node",
"name": "Telegram Notification",
"type": "n8n-nodes-base.telegram",
"position": [
1536,
-144
],
"parameters": {
"text": "=\ud83e\udd16 **Weekly Review abgeschlossen!**\\n\\n\ud83d\udcca KW {{ $('Weekly Filter').first().json.weekNumber }}: **{{ $('Weekly Filter').first().json.entryCount }} Eintr\u00e4ge** analysiert\\n\\n\ud83c\udfaf **\\n\u2705 Siehe E-Mail f\u00fcr Details\\n\\n\ud83d\udce7 **Detaillierte E-Mail** ist unterwegs!",
"chatId": "123456789",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "802a1f2f-2d90-4836-beff-50b4ae729be7",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
1760,
-144
],
"parameters": {
"sendTo": "user@example.com",
"message": "={{ $('AI E-Mail Summary').item.json.message.content }}",
"options": {},
"subject": "=Weekly review KW {{ $('Weekly Filter').item.json.weekNumber }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "414a9ba8-e97c-4f3d-8ec9-04de39886d95",
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
656,
64
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b6f758b2-7efa-4561-97cf-68ca08f98a0a",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"position": [
864,
64
],
"parameters": {
"text": "Weekly review hat nicht funktioniert",
"chatId": "123456789",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
}
],
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "f4fba99e-4cea-448d-a6ea-493fd8962eda",
"connections": {
"Error Trigger": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Weekly Filter": {
"main": [
[
{
"node": "AI Task Extractor",
"type": "main",
"index": 0
}
]
]
},
"Get a document": {
"main": [
[
{
"node": "Weekly Filter",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get a document",
"type": "main",
"index": 0
}
]
]
},
"AI E-Mail Summary": {
"main": [
[
{
"node": "Tasks ins Doc speichern",
"type": "main",
"index": 0
}
]
]
},
"AI Task Extractor": {
"main": [
[
{
"node": "AI E-Mail Summary",
"type": "main",
"index": 0
}
]
]
},
"Telegram Notification": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Tasks ins Doc speichern": {
"main": [
[
{
"node": "Telegram Notification",
"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.
gmailOAuth2googleDocsOAuth2ApiopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n template demonstrates how to automatically analyze all your accumulated notes from the past week and generate actionable insights, task lists, and priorities using AI.
Source: https://n8n.io/workflows/8119/ — 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.
Personalized Outreach & Follow-Up - Phase 2. Uses googleSheets, openAi, gmail, gmailTrigger. Scheduled trigger; 59 nodes.
Listens for completed Fireflies transcripts, qualifies whether a proposal is needed using OpenAI, drafts structured proposal content, populates a Google Doc template, converts to PDF, and sends it to
Imagine a dedicated financial expert tirelessly working behind the scenes, sifting through every transaction, every investment move, and every accounting entry. That's exactly what this automated syst
Daily trigger scans your Notion database for unpublished blog ideas AI generates complete blog posts + engaging LinkedIn content using OpenAI (Blog Posting is not implemented yet) Creates custom image
Consultants, agencies, freelancers, and professional service firms who need to create customized proposals and contracts quickly and efficiently.