Bot de calendrier Telegram
Ceci est unPersonal Productivityworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme If, Code, Telegram, GoogleCalendar, ScheduleTrigger. Envoyer des notifications de résumé quotidien du calendrier de Google Calendar via Telegram
- •Token Bot Telegram
Nœuds utilisés (11)
Catégorie
{
"id": "SeY9lTVPdPeVIQdg",
"meta": {
"instanceId": "b7b2db9d6a461f902b25d685e4550cab3c88fcbb3254a8654e06246b67e4ff5c",
"templateCredsSetupCompleted": true
},
"name": "Bot Telegram Calendar",
"tags": [
{
"id": "5iQR5Cw05Bzz7Aqt",
"name": "Google",
"createdAt": "2025-08-02T17:36:32.751Z",
"updatedAt": "2025-08-02T17:36:32.751Z"
},
{
"id": "DW3QCDhQZ9ZpSunz",
"name": "Bot",
"createdAt": "2025-08-02T17:37:06.011Z",
"updatedAt": "2025-08-02T17:37:06.011Z"
},
{
"id": "pvFbKYpUu6xv7RQ8",
"name": "Calendar",
"createdAt": "2025-08-02T17:36:30.352Z",
"updatedAt": "2025-08-02T17:36:30.352Z"
},
{
"id": "rYuINsb3Y1XjrgNv",
"name": "Productivity",
"createdAt": "2025-08-02T17:36:49.812Z",
"updatedAt": "2025-08-02T17:36:49.812Z"
},
{
"id": "yfpCFhbNZGRtYKc0",
"name": "Telegram",
"createdAt": "2025-08-02T17:36:35.592Z",
"updatedAt": "2025-08-02T17:36:35.592Z"
}
],
"nodes": [
{
"id": "a79f7817-b3e8-417c-b176-eb507d9c7b69",
"name": "Compter événement",
"type": "n8n-nodes-base.code",
"position": [
416,
0
],
"parameters": {
"jsCode": "// Get all the event from the items\nconst allItems = $items(\"Check google Calendar\");\n\n// initiate event board\nlet events = [];\n\n// Check items and extract events\nallItems.forEach(item => {\n const data = item.json;\n\n if (Array.isArray(data)) {\n events.push(...data.filter(e => e && Object.keys(e).length > 0));\n } else if (data && Object.keys(data).length > 0) {\n events.push(data);\n }\n});\n\n// Calculate the number of events\nconst eventCount = events.length;\n\nreturn [\n {\n json: {\n eventCount,\n events\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "3daa99b4-dc92-47eb-a9a2-a749ca5fa215",
"name": "Déclencheur 7h",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.2
},
{
"id": "11e1cff6-439b-4cae-8d1c-a48e7a8bed90",
"name": "Condition If",
"type": "n8n-nodes-base.if",
"position": [
624,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "0a556b19-d5f6-42fd-aa9f-6ebfc2c5e042",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.eventCount}}",
"rightValue": 0
}
]
}
},
"executeOnce": false,
"typeVersion": 2.2,
"alwaysOutputData": false
},
{
"id": "711a4b13-a376-4f54-b458-f97a832e4fe1",
"name": "Code message",
"type": "n8n-nodes-base.code",
"position": [
832,
-96
],
"parameters": {
"jsCode": "// Get all of the events from IF true branch\nconst rawItems = $items();\nlet events = [];\n\n// Normalize data\nrawItems.forEach(item => {\n const data = item.json;\n\n if (Array.isArray(data.events)) {\n events.push(...data.events);\n } else if (data.event) {\n events.push(data.event);\n } else {\n events.push(data);\n }\n});\n\n// Message creation\nlet message = `☀️ Good morning! Here's your calendar for today\\n\\n📅 You have ${events.length} event${events.length > 1 ? 's' : ''} today.\\n\\n`;\n\nevents.forEach(e => {\n message += `──────────────────────\\n`;\n message += `📌 Name: ${e.summary || \"N/A\"}\\n`;\n message += `⏰ Starts: ${e.start?.dateTime || e.start?.date || \"N/A\"}\\n`;\n message += `⏳ Ends: ${e.end?.dateTime || e.end?.date || \"N/A\"}\\n\\n`;\n\n message += `👤 Creator: ${e.creator?.email || \"N/A\"}\\n`;\n message += `👥 Organizer: ${e.organizer?.email || \"N/A\"}\\n\\n`;\n\n message += `📄 Type: ${e.eventType || \"N/A\"}\\n`;\n message += `🔗 Link: ${e.htmlLink || \"N/A\"}\\n\\n`;\n\n message += `📝 Description: ${e.description || \"No description\"}\\n`;\n message += `📍 Location: ${e.location || \"N/A\"}\\n\\n`;\n});\n\nmessage += \"✨ Have a great day!\";\n\nreturn [\n {\n json: {\n text: message\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "b6b693b3-c599-49e2-b4cd-7781ef0c97c0",
"name": "Message pas de réunion aujourd'hui",
"type": "n8n-nodes-base.telegram",
"position": [
928,
176
],
"webhookId": "9d964a15-b2bc-4d33-afbe-fdb5d537d11a",
"parameters": {
"text": "=👋 Hi! Your calendar is clear for today 🗓️✨",
"chatId": "1234",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "q45sTNe4DEc2aR0Q",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "774ce326-9fd9-4136-8882-e68167c23c13",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
-496
],
"parameters": {
"color": 2,
"width": 416,
"height": 848,
"content": "## 1.Workflow trigger and Google Calendar\n\nThe workflow is **triggered automatically** each morning at 7am.\n\nThen the second node will **analyse your Google Calendar** of the day looking for any event or meeting scheduled.\n\nHow to setup:\nSet up your Google Agenda **API credentials** "
},
"typeVersion": 1
},
{
"id": "d2319706-cda9-45a0-860e-d3b1f330d3f0",
"name": "Vérifier calendrier google",
"type": "n8n-nodes-base.googleCalendar",
"position": [
208,
0
],
"parameters": {
"options": {
"orderBy": "startTime"
},
"calendar": {
"__rl": true,
"mode": "list",
"value": "fr.french#holiday@group.v.calendar.google.com",
"cachedResultName": "Jours fériés et autres fêtes en France"
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "UNaR3A3kfDhLIVuc",
"name": "Google Calendar account"
}
},
"executeOnce": false,
"typeVersion": 1.3,
"alwaysOutputData": true
},
{
"id": "79952d85-8136-40b4-976a-409ecb103230",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
-496
],
"parameters": {
"color": 5,
"width": 368,
"height": 848,
"content": "## 2.Count event code and Branch\n\nThe first node will **count the number of event items** scheduled and **return a number**. Even if there is no event, a number (0 in this case) would be returned.\n\nThe the second node will **analyse this number**, if the number is not 0, the True branch ✅ will be activated. If it's O, it will be the False branch ❌ that will be activated."
},
"typeVersion": 1
},
{
"id": "bbc556dc-619a-4bc1-9fdb-6c0f3a44576e",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-496
],
"parameters": {
"color": 4,
"width": 560,
"height": 848,
"content": "## 3. Send the telegram message\n\nIn the **True branch** ✅, the code node, will create the message and gather all the informations wanted about the events and meeting. So a full sum um will be sent in one message only.\nIn the Telegram send text node, the **message is sent**.\n\nIf it's the **False branch** ❌, the Telegram node will send the **message about not having meeting that day**.\n\nHow to setup:\n- Set up a Telegram bot and get the key API.\n- Connect the API credentials to the node.\n- For the **True branch** ✅, set up your message in javascript and then copy and paste the json file in the next node.\n- For the **False branch** ❌, just set up your message."
},
"typeVersion": 1
},
{
"id": "1e479d9c-0d57-469c-8631-195a879fb351",
"name": "Envoyer message récapitulatif",
"type": "n8n-nodes-base.telegram",
"position": [
1040,
-96
],
"webhookId": "126cc2af-1a44-4309-af2b-83a5f71d65d7",
"parameters": {
"text": "={{ $json.text }}",
"chatId": "1234",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "q45sTNe4DEc2aR0Q",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "2d7ba810-f3d8-4e33-940f-516ea9b93a71",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-496
],
"parameters": {
"color": 3,
"content": "## Required\n\n- Telegram Bot and its API\n- Google account\n- Google Calendar API"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "8576f66a-463e-4a95-a07a-205e8f57ff27",
"connections": {
"3daa99b4-dc92-47eb-a9a2-a749ca5fa215": {
"main": [
[
{
"node": "d2319706-cda9-45a0-860e-d3b1f330d3f0",
"type": "main",
"index": 0
}
]
]
},
"a79f7817-b3e8-417c-b176-eb507d9c7b69": {
"main": [
[
{
"node": "11e1cff6-439b-4cae-8d1c-a48e7a8bed90",
"type": "main",
"index": 0
}
]
]
},
"11e1cff6-439b-4cae-8d1c-a48e7a8bed90": {
"main": [
[
{
"node": "711a4b13-a376-4f54-b458-f97a832e4fe1",
"type": "main",
"index": 0
}
],
[
{
"node": "b6b693b3-c599-49e2-b4cd-7781ef0c97c0",
"type": "main",
"index": 0
}
]
]
},
"711a4b13-a376-4f54-b458-f97a832e4fe1": {
"main": [
[
{
"node": "1e479d9c-0d57-469c-8631-195a879fb351",
"type": "main",
"index": 0
}
]
]
},
"d2319706-cda9-45a0-860e-d3b1f330d3f0": {
"main": [
[
{
"node": "a79f7817-b3e8-417c-b176-eb507d9c7b69",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Productivité personnelle
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Yassin Zehar
@yassinzeharDigital & IT Project Manager | Data-oriented | Agile certified (PSM I, PSPO I) | 6+ yrs experience | Paris
Partager ce workflow