This workflow corresponds to n8n.io template #8648 — we link there as the canonical source.
This workflow follows the Agent → Gmail 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 →
{
"id": "63Dw6h0zoqobTINZ",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Personal Telegram AI Assistant bot",
"tags": [],
"nodes": [
{
"id": "79c2aa38-769d-4dd5-bb4a-cf675ea22e2d",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"notes": "Enter your Telegram bot token from BotFather after creating the bot.\n",
"position": [
-640,
0
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "66a44dc8-8914-4555-9c38-1436ad19307a",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
384,
16
],
"parameters": {
"text": "={{ $json.message.text }}{{ $json.content.parts[0].text }}",
"options": {
"systemMessage": "=You are a useful assistant to {{ $json.message.from.first_name }}. You can send emails, View and edit Calendar events, created notes in notion and also try to do tasks as assigned by them. "
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "736b9880-a4c8-471d-a0e0-58a8b51c6cb5",
"name": "Send a message in Gmail",
"type": "n8n-nodes-base.gmailTool",
"notes": "Connect a Gmail account by opening console.cloud.google.com, enabling the Gmail API for the project, and completing Google account authorization.",
"position": [
1040,
384
],
"parameters": {
"sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {
"appendAttribution": false
},
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 2.1
},
{
"id": "4cff267f-45dc-466e-869b-e4b4e08dfd91",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
560,
-176
],
"parameters": {
"sessionKey": "={{ $json.message.text }}{{ $json.content.parts[0].text }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "89e93f91-c0aa-438d-87bd-5a1f525c36f5",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"notes": "Enter the Google Gemini API key to enable Gemini model.",
"position": [
400,
-176
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "ecb246b8-653d-46fb-817c-f123e22f871f",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"notes": "Sends the bot\u2019s response after the workflow finishes executing.",
"position": [
1072,
16
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1.2
},
{
"id": "4948f012-fb76-49d0-85fd-0327d398b45f",
"name": "Check If Audio file",
"type": "n8n-nodes-base.if",
"notes": "Determines if the incoming message is an audio file or a text message, then routes it accordingly.",
"position": [
-208,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "281d35b3-486b-41e2-9b29-8b51de139dd6",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice.file_id }}",
"rightValue": "={{ $json.message.chat.id }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3461eb67-c0b2-4173-8b2e-de919b14f8c4",
"name": "Transcribe a recording",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"notes": "This node transcribes audio to text via Google Gemini; provide the Gemini credentials to establish the connection.",
"position": [
144,
-160
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "audio",
"inputType": "binary"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "189f07e3-6d2f-4b33-bd69-ee8c2c9d9916",
"name": "Get a file",
"type": "n8n-nodes-base.telegram",
"position": [
-16,
-160
],
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3bb3d890-849d-4c42-8b84-636971098567",
"name": "Create an event in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"notes": "Connect Google Calendar to this node. This node enables the Create Event action in Google Calendar.",
"position": [
720,
384
],
"parameters": {
"end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', `start time and end time for google calendar event.`, 'string') }}",
"start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com",
"cachedResultName": "user@example.com"
},
"descriptionType": "manual",
"toolDescription": "Create an event in Google Calendar",
"additionalFields": {}
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1.3
},
{
"id": "fd1c0213-c0b1-41c4-9274-43cd63cb1193",
"name": "Read event in Google Calendar",
"type": "n8n-nodes-base.googleCalendarTool",
"notes": "Connect Google Calendar to this node. This node enables the Read Event action in Google Calendar.",
"position": [
560,
384
],
"parameters": {
"options": {},
"timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
"timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "user@example.com",
"cachedResultName": "user@example.com"
},
"operation": "getAll",
"descriptionType": "manual",
"toolDescription": "Get events from google calendar when request. Consider sending all the events for the specific day stated by user."
},
"credentials": {
"googleCalendarOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "214c9e52-968a-4933-839e-946cbfcd5f6f",
"name": "Create notes in Notion",
"type": "n8n-nodes-base.notionTool",
"notes": "Create a Notion integration and paste its API key into the Notion credentials, then provide the public page URL where the bot should post messages.",
"position": [
880,
384
],
"parameters": {
"title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', `Notes by Paul Created by Liz AI`, 'string') }}",
"pageId": {
"__rl": true,
"mode": "url",
"value": "https://www.notion.so/N8N-AI-Agent-Notes-26f11b7ddc0680ae8913d9c1ea7faff4?source=copy_link"
},
"blockUi": {
"blockValues": [
{
"type": "bulleted_list_item",
"textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('blockValues0_Text', ``, 'string') }}"
},
{
"url": "={{ $fromAI('blockValues1_Image_URL', ``, 'string') }}",
"type": "image"
}
]
},
"options": {}
},
"credentials": {
"notionApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 2.2
},
{
"id": "cb8c4cbf-d6df-4e03-b84a-a3fea6331f39",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-672,
-192
],
"parameters": {
"color": 2,
"width": 592,
"height": 368,
"content": "## Telegram Trigger & Checks\n- Starts the workflow when a message is received on Telegram. \n- Verifies the account to ensure only authorized users can access the bot. \n- Checks if the incoming message contains an audio file or just text. "
},
"typeVersion": 1
},
{
"id": "bf1fe6ec-79a3-4e94-862c-3c5427f86014",
"name": "Account Check",
"type": "n8n-nodes-base.switch",
"notes": "Provide the message ID from your Telegram account in the parameter value field to authenticate your chat.\n",
"position": [
-416,
0
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "773564ea-faf4-4a3a-982c-7c3ee092547c",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $json.message.chat.id }}",
"rightValue": null
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "0b38ba6b-85ec-4de1-bacb-9d7381fc5398",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
-288
],
"parameters": {
"color": 3,
"width": 384,
"height": 304,
"content": "## Audio Handling\n- Retrieves the audio file if the input is a voice note. \n- Transcribes the recording into text so it can be processed by the AI. "
},
"typeVersion": 1
},
{
"id": "b30e6ccd-eebe-4972-9105-f61ce4f64a78",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
336,
-352
],
"parameters": {
"width": 368,
"height": 336,
"content": "\n## AI Setup\n- Defines the AI model (Google Gemini Chat Model). \n- Adds Simple Memory to maintain conversation context. "
},
"typeVersion": 1
},
{
"id": "eb6027ec-0990-433e-aff6-2cfd184e9f6c",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
256
],
"parameters": {
"color": 4,
"width": 896,
"height": 288,
"content": "\n## AI Setup\n- Defines the AI model (Google Gemini Chat Model). \n- Adds Simple Memory to maintain conversation context. "
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"timezone": "Asia/Kolkata",
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "Q3zRHMkTDIS89L8B",
"executionOrder": "v1"
},
"versionId": "61be5764-628d-4b58-bbd8-783962aece29",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Get a file": {
"main": [
[
{
"node": "Transcribe a recording",
"type": "main",
"index": 0
}
]
]
},
"Account Check": {
"main": [
[
{
"node": "Check If Audio file",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Account Check",
"type": "main",
"index": 0
}
]
]
},
"Check If Audio file": {
"main": [
[
{
"node": "Get a file",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Create notes in Notion": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Transcribe a recording": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Send a message in Gmail": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Read event in Google Calendar": {
"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
}
]
]
}
}
}
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.
gmailOAuth2googleCalendarOAuth2ApigooglePalmApinotionApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Use cases Hands-free scheduling with Google Calendar Quickly capturing ideas as Notion notes via voice Sending Gmail messages directly from Telegram A personal productivity assistant available on-the-go
Source: https://n8n.io/workflows/8648/ — 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.
Telegram Trigger receives incoming messages (text, voice, photo, document). Switch routes by message type to appropriate processors: Text → forwarded as-is. Voice → downloaded and sent to Transcribe a
Transform your Telegram messenger into a powerful, multi-modal personal or team assistant. This n8n workflow creates an intelligent agent that can understand text, voice, images, and documents, and ta
A comprehensive n8n workflow demonstrating advanced AI agent orchestration, stateful conversation management, and multi-modal input processing for nutrition tracking applications.
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.
> AI-powered nutrition assistant for Telegram — log meals, set goals, and get personalized daily reports with Google Sheets integration.