This workflow corresponds to n8n.io template #17231 — we link there as the canonical source.
This workflow follows the Agent → Google Calendar Tool 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 →
{
"name": "Telegram AI personal assistant with voice notes, memory and Google Calendar reminders using OpenAI",
"nodes": [
{
"id": "a4c72cba-fbf6-4c43-943b-27a35b58ca35",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
-384
],
"parameters": {
"width": 480,
"height": 896,
"content": "## Telegram AI personal assistant with voice notes, memory and Google Calendar reminders using OpenAI\n\n### How it works\n\nThis workflow turns Telegram into an AI personal assistant that accepts either text messages or voice notes. It normalizes incoming input into a text prompt, sends it to an AI agent with conversation memory, calculator support, and a Google Calendar reminder tool, then replies back in Telegram. Unsupported message types receive a prompt asking the user to send text or voice.\n\n### Setup steps\n\n- Configure Telegram credentials for the trigger, file download, fallback prompt, and reply nodes, and connect the workflow to the desired Telegram bot.\n- Edit the settings node to set assistantName, ownerName, and timezone for the assistant\u2019s behavior.\n- Configure OpenAI credentials for the voice transcription node and the GPT-5 Mini chat model used by the agent.\n- Connect Google Calendar credentials for the Add Calendar Reminder tool and confirm the target calendar/reminder behavior.\n- Review the Telegram message-type routing rules so text, voice, and unsupported inputs match your bot\u2019s expected payload structure.\n\n### Customization\n\nYou can adjust the assistant identity and timezone in the settings node, change the OpenAI model, tune the conversation memory window, or modify the agent prompt/tools to add more personal-assistant capabilities."
},
"typeVersion": 1
},
{
"id": "975016a3-4ec3-4372-94f6-8804070882bd",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
-96
],
"parameters": {
"color": 7,
"width": 736,
"height": 352,
"content": "## Receive and route messages\n\nInitial left-side cluster that receives Telegram updates, applies editable assistant settings, and branches the workflow based on whether the incoming message is text, voice, or another type."
},
"typeVersion": 1
},
{
"id": "550b7f03-c45a-40e6-8e6d-0731f1d3b0a0",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-384
],
"parameters": {
"color": 7,
"width": 240,
"height": 800,
"content": "## Handle text and fallback\n\nUpper/lower branch nodes near the router that either extract a text message into the shared userMessage field or ask the user to send a supported text or voice input."
},
"typeVersion": 1
},
{
"id": "9f0f95cc-b998-4bd1-844e-d1793bb15cfb",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
-80
],
"parameters": {
"color": 7,
"width": 720,
"height": 320,
"content": "## Transcribe voice notes\n\nMiddle branch cluster that downloads Telegram voice notes, transcribes them with OpenAI, and converts the transcription into the same userMessage format used by the agent."
},
"typeVersion": 1
},
{
"id": "5448bc49-d02b-4f41-ae55-23b7fa504ca9",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1360,
288
],
"parameters": {
"color": 7,
"width": 704,
"height": 576,
"content": "## Run assistant agent\n\nRight-side AI cluster where the personal assistant processes the normalized message using the chat model, conversation memory, calculator, and Google Calendar reminder tool."
},
"typeVersion": 1
},
{
"id": "c6bceba2-de38-4841-94d3-1629d150f35d",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1920,
-144
],
"parameters": {
"color": 7,
"width": 240,
"height": 368,
"content": "## Send Telegram reply\n\nFinal output node at the far right that sends the assistant\u2019s generated response back to the user in Telegram."
},
"typeVersion": 1
},
{
"id": "tg1",
"name": "When Telegram Message Received",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
0,
60
],
"parameters": {
"updates": [
"message"
]
},
"typeVersion": 1.2
},
{
"id": "tg2",
"name": "Set Assistant Preferences",
"type": "n8n-nodes-base.set",
"position": [
280,
60
],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "s1",
"name": "assistantName",
"type": "string",
"value": "Aria"
},
{
"id": "s2",
"name": "ownerName",
"type": "string",
"value": "Alex"
},
{
"id": "s3",
"name": "timezone",
"type": "string",
"value": "Asia/Dhaka"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "tg3",
"name": "Route by Telegram Content Type",
"type": "n8n-nodes-base.switch",
"position": [
540,
60
],
"parameters": {
"mode": "rules",
"rules": {
"values": [
{
"outputKey": "text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice.file_id }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra",
"renameFallbackOutput": "other"
}
},
"typeVersion": 3.4
},
{
"id": "tg4",
"name": "Set Text Message Content",
"type": "n8n-nodes-base.set",
"position": [
820,
-100
],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "t1",
"name": "userMessage",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "tg5",
"name": "Fetch Telegram Voice Note",
"type": "n8n-nodes-base.telegram",
"position": [
1088,
80
],
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"download": true,
"resource": "file",
"operation": "get"
},
"typeVersion": 1.2
},
{
"id": "tg6",
"name": "OpenAI Voice Transcriber",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1360,
80
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe",
"binaryPropertyName": "data"
},
"typeVersion": 2.3
},
{
"id": "tg7",
"name": "Set Transcribed Voice Text",
"type": "n8n-nodes-base.set",
"position": [
1616,
80
],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "v1",
"name": "userMessage",
"type": "string",
"value": "={{ $json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "tg8",
"name": "Request Text or Voice Message",
"type": "n8n-nodes-base.telegram",
"position": [
820,
260
],
"parameters": {
"text": "Hi! I can help with text messages or voice notes. Please send your request as a message.",
"chatId": "={{ $('When Telegram Message Received').item.json.message.chat.id }}",
"resource": "message",
"operation": "sendMessage",
"additionalFields": {
"appendAttribution": false
}
},
"typeVersion": 1.2
},
{
"id": "tg9",
"name": "AI Personal Assistant Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1616,
448
],
"parameters": {
"text": "={{ $json.userMessage }}",
"options": {
"systemMessage": "=You are {{ $('Set Assistant Preferences').item.json.assistantName }}, a friendly personal assistant for {{ $('Set Assistant Preferences').item.json.ownerName }} on Telegram.\n\nThe current date and time is {{ $now }} in timezone {{ $('Set Assistant Preferences').item.json.timezone }}. Use this to resolve relative times like \"tomorrow\" or \"in 2 hours\".\n\nYou can: answer questions, do quick calculations with the Calculator tool, and set reminders/events with the Add Calendar Reminder tool. When the user asks to be reminded or to schedule something, create a calendar event and confirm the exact date and time back to them.\n\nKeep replies short and friendly for Telegram (plain text, no markdown symbols). Reply in the same language the user used."
},
"promptType": "define"
},
"typeVersion": 3.1
},
{
"id": "tg10",
"name": "OpenAI GPT-5 Mini Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1408,
1104
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-mini"
}
},
"typeVersion": 1.3
},
{
"id": "tg11",
"name": "Manage Conversation History",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1568,
1104
],
"parameters": {
"sessionKey": "={{ $('When Telegram Message Received').item.json.message.chat.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.3
},
{
"id": "tg12",
"name": "Create Google Calendar Event",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1744,
1104
],
"parameters": {
"end": "={{ $fromAI('end', 'Reminder end datetime in ISO 8601') }}",
"start": "={{ $fromAI('start', 'Reminder start datetime in ISO 8601') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "primary"
},
"resource": "event",
"operation": "create",
"additionalFields": {
"summary": "={{ $fromAI('title', 'Short title of the reminder or event') }}"
}
},
"typeVersion": 1.3
},
{
"id": "tg13",
"name": "AI Calculator Tool",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
1920,
1104
],
"parameters": {},
"typeVersion": 1
},
{
"id": "tg14",
"name": "Send Reply via Telegram API",
"type": "n8n-nodes-base.telegram",
"position": [
1960,
60
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('When Telegram Message Received').item.json.message.chat.id }}",
"resource": "message",
"operation": "sendMessage",
"additionalFields": {
"appendAttribution": false
}
},
"typeVersion": 1.2
}
],
"connections": {
"AI Calculator Tool": {
"ai_tool": [
[
{
"node": "AI Personal Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI GPT-5 Mini Model": {
"ai_languageModel": [
[
{
"node": "AI Personal Assistant Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Voice Transcriber": {
"main": [
[
{
"node": "Set Transcribed Voice Text",
"type": "main",
"index": 0
}
]
]
},
"Set Text Message Content": {
"main": [
[
{
"node": "AI Personal Assistant Agent",
"type": "main",
"index": 0
}
]
]
},
"Fetch Telegram Voice Note": {
"main": [
[
{
"node": "OpenAI Voice Transcriber",
"type": "main",
"index": 0
}
]
]
},
"Set Assistant Preferences": {
"main": [
[
{
"node": "Route by Telegram Content Type",
"type": "main",
"index": 0
}
]
]
},
"Set Transcribed Voice Text": {
"main": [
[
{
"node": "AI Personal Assistant Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Personal Assistant Agent": {
"main": [
[
{
"node": "Send Reply via Telegram API",
"type": "main",
"index": 0
}
]
]
},
"Manage Conversation History": {
"ai_memory": [
[
{
"node": "AI Personal Assistant Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Create Google Calendar Event": {
"ai_tool": [
[
{
"node": "AI Personal Assistant Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Route by Telegram Content Type": {
"main": [
[
{
"node": "Set Text Message Content",
"type": "main",
"index": 0
}
],
[
{
"node": "Fetch Telegram Voice Note",
"type": "main",
"index": 0
}
],
[
{
"node": "Request Text or Voice Message",
"type": "main",
"index": 0
}
]
]
},
"When Telegram Message Received": {
"main": [
[
{
"node": "Set Assistant Preferences",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow turns a Telegram bot into a personal assistant that accepts text or voice notes, transcribes audio with OpenAI, uses a memory-enabled AI agent for replies and calculations, and creates Google Calendar reminder events from natural-language requests. Triggers…
Source: https://n8n.io/workflows/17231/ — 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.
BoomerBobBot.TP. Uses agent, telegramTrigger, telegram, memoryBufferWindow. Event-driven trigger; 95 nodes.
Personal Assistant. Uses memoryBufferWindow, agent, agentTool, httpRequestTool. Event-driven trigger; 77 nodes.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
Jarvis is a powerful multi-agent productivity assistant built in n8n. It works directly from Telegram and can understand both text messages and voice notes.
Inbox Guardian. Uses gmailTrigger, lmChatOpenAi, agent, textClassifier. Event-driven trigger; 66 nodes.