Grok BotSoftwareShipping codeAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Telegram Multi-Tool Personal Assistant: Grok-4 + Calendar/Mail/Memory

Trigger in Telegram chat → n8n routes text or voice → load Airtable memories → Grok-4 Agent calls tools → reply in Telegram

Some experienceStepsWorkflowPrompt
Who
Individual users who want to manage schedule, query email, and recall memories via natural language in Telegram
You get
Chat with an AI assistant in Telegram that auto-saves memories and calls Calendar/Gmail/Notion/search tools on demand
You need
n8n · telegram · grok-4 · airtable · google-calendar · gmail · notion · serpapi

Constraints

Requires an n8n instance (self-hosted or cloud), Telegram Bot token from @BotFather, xAI Grok API key, OpenAI API key, Airtable base/table, Google Calendar/Gmail OAuth, Notion integration token, and SerpAPI key. The template workflow.json can be imported directly into n8n.

What they did

Author vladzima published an official n8n template building a personal AI assistant workflow with Telegram as the entry point. The workflow receives text or voice via Telegram Trigger, routes through an If node: text goes directly to the Agent, while voice is downloaded via Telegram and transcribed with OpenAI before entering. In parallel, historical user memories are loaded from Airtable, aggregated into a Memories array, and merged with the current input. The AI Agent uses xAI Grok-4 for reasoning, equipped with Simple Memory (30-turn short-term memory) and multiple tools: SerpAPI search, Google Calendar CRUD, Gmail queries, Notion database queries, and Airtable Save Memory. The system prompt instructs the Agent to judge on each turn whether new user information should be saved, silently calling Save Memory to Airtable without informing the user. The final response is sent back via Telegram.

How it went

Published as an importable workflow on n8n.io (author_report). No third-party independent validation or performance benchmarks are provided by the source. Typical use cases include: creating events by voice, querying upcoming meetings, summarizing emails, recalling reading lists, and web search.

Worth knowing

This site has not imported or run the workflow (reproduction=not_tested). Key limitations: 1) Requires 8 external API credentials, posing a high setup barrier; 2) Airtable base/table IDs and filterByFormula must be replaced by the user; 3) Google Calendar and Notion ID fields are empty in the template and must be manually selected; 4) Tool call latency stacks onto Telegram response time; 5) OpenAI transcription has audio format and length limits; 6) Memory volume growth requires periodic archiving or adjusting the Aggregate window; 7) Sensitive information may be saved to Airtable — restrict base access; 8) Name/gender placeholders in the system prompt must be replaced by the user, otherwise the Agent's self-identity remains incomplete.

Steps

  1. Configure Telegram trigger and message router

    After importing the template into n8n, configure the Telegram Trigger node: create a bot via @BotFather and obtain the token, enter it as the telegramApi credential; set additionalFields.chatIds to your Telegram user ID; set download = true to support voice messages. Configure the Text vs Voice Router (If node): condition checks whether $json.message.text exists — if yes, route to text path; if not (voice message), route to voice branch. This node also triggers Get memories in parallel to fetch historical context.

  2. Configure voice transcription branch (optional)

    If the user sends a voice message, the flow routes to Get a file to download the voice file (fileId = $json.message.voice.file_id), then to Transcribe a recording (OpenAI audio transcribe operation) to convert speech to text before merging into the Agent input. Text messages bypass this branch and go directly to Merge.

  3. Configure memory system

    Long-term memory: create an Airtable base/table with fields Memory, User, and Created (auto-managed). In the Get memories node, set the base/table ID and filterByFormula (e.g., {User} = 'your_name'). The Aggregate node packs Memory and Created into a Memories array. The Merge node combines current input with Memories before sending to the Agent. Short-term memory: in Simple Memory, set sessionKey = {{ $('If').item.json.message.chat.id }} and contextWindowLength = 30 (adjustable). The Save Memory tool node uses the same base/table, with User hardcoded or mapped and Memory using $fromAI('Memory').

  4. Connect tools and credentials

    Create and link credentials for each tool: xAI Grok Chat Model (model: grok-4-0709, credential: xAiApi); Search Web with SerpAPI (serpApi); Google Calendar tools (googleCalendarOAuth2Api): Get many events / Create / Update / Delete; Gmail tools (gmailOAuth2): Get many messages / Get a message; Notion tool (notionApi): Get a database, databaseId required; Save Memory (airtableTokenApi). All tools connect to the AI Agent via ai_tool links.

  5. Configure AI Agent system prompt and input

    In the AI Agent node, set promptType = define. For Text input, use the expression: ={{ $json.text }}{{ $json.message.text }} (merges transcribed text with original text). Enter the following system prompt (replace ____ with your actual info):

    Execution prompt · Source text。AI Agent node System Message field

    =# ROLE  
    You are a friendly AI assistant.  
    You are talking to ____. Your name is ____, your gender is ____.
    
    # RULES  
    When the user sends a new message, determine whether it contains information that should be saved in memory. Keep in mind that almost everything needs to be saved, as every detail is important to the user. Call the **Save Memory** tool to save the information. DO NOT inform the user that the information has been saved. Just continue to answer the question or perform the next tasks.  
    Do not use emojis, only in cases where it is truly appropriate.
    
    # Tools  
    ## Save Memory  
    Use this tool to save information about the user. Extract and briefly summarize the details from the user's message and pass them to this tool.  
    ## SerpAPI  
    Use this tool if you need to find something on the Internet.  
    ## Google Calendar  
    These are several tools to be used if the user requests something related to the calendar and schedule.  
    ## Gmail  
    These are several tools to be used if the user requests something related to email and messages.  
    ## Notion  
    These are several tools to be used if the user requests something related to Notion, Neurocracy, or reading lists.
    
    # Memory  
    Below are the latest significant memories collected about the user, including the date and time they were created.  
    !! IMPORTANT!  
    Think through your responses and consider the user's preferences!  
    Also, keep in mind the date and time when the memory was saved to always have the most up-to-date information.
    
    {{ $json.Memories.toJsonString() }}
  6. Configure Telegram reply and test

    In Send a text message, set chatId = {{ $('Telegram Trigger').item.json.message.chat.id }}, text = {{ $json.output }}, appendAttribution = false. Save and activate the workflow. Test by sending text or voice messages to your bot in Telegram. Verify: text messages get direct replies; voice messages are transcribed then replied; calendar/email/search/Notion queries trigger the corresponding tools; personal facts are silently saved to Airtable.

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant; first confirm inputs and permissions

This block is the prompt. Ads are never placed here.

You are an n8n template setup assistant. The user wants to replicate the 'Telegram Multi-Tool Personal Assistant' template. First confirm whether the user already has: an n8n instance, Telegram bot token and user ID, xAI Grok API key, OpenAI API key, Airtable base/table, Google OAuth (Calendar + Gmail), Notion integration token, and SerpAPI key. If any are missing, provide acquisition guidance. Then guide step-by-step through importing workflow.json, configuring each node's credentials, replacing placeholders in the system prompt, and suggest testing with text first, then voice and tool calls.

Replace ____ in the system prompt with actual user info; Airtable filterByFormula and User field must match your account; Google Calendar and Notion IDs must be obtained from their respective platforms.

Source

Multi-tool personal assistant with Telegram, Grok-4, Gmail, Calendar & Memory · vladzima · n8n.io · 2025-08-15

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related