ChatGPTSalesRevenue growthAI score · 73/100AI-assisted edit · no obvious prompt-injection riskn8n.io

Build a GPT-4o AI Personal Assistant in n8n: Email, Calendar, Search & CRM Automation

Telegram message → OpenRouter GPT-4o routing → multi-tool agent execution → Telegram reply

Some experienceStepsWorkflowPrompt
Who
Individuals or small teams with an n8n instance who need integrated email, calendar, search, and contact automation
You get
Manage emails, schedule, search, and contacts via Telegram chat with an AI agent that retains context through a memory node
You need
n8n · telegram · gmail

Constraints

Prerequisites: n8n instance (self-hosted or Cloud), OpenRouter account and API key, Telegram Bot Token, SerpApi key, Perplexity API key, Google API credentials (if using Gmail/Calendar/Contacts). Experience: some (credential setup and n8n node wiring required). Cost: OpenRouter, SerpApi, Perplexity billed per their pricing; Telegram Bot is free.

What they did

Author jordanlee published an official n8n template demonstrating how to build a comprehensive AI personal assistant using Telegram as the trigger, OpenRouter GPT-4o as the supervisor, multiple tool agents (Gmail, Calendar, Contacts, Google Search, Calculator, LinkedIn Comment, Perplexity), and a memory node. When a user sends a Telegram message, the AI Agent routes to the appropriate tool based on its systemMessage role definition and tool list, then returns the result via Telegram.

How it went

The template has 23,424 views on n8n.io (as of fetch date). The author reports it can automatically coordinate multiple agents for email management, scheduling, search, and CRM operations with memory-persisted context (author_report). This site has not executed a reproduction.

Worth knowing

1. Calendar, Gmail, Contacts, and LinkedIn Comment Agent are toolWorkflow nodes referencing external workflows (workflowIds such as tC8OSGmmiBE9kvnt, mh7GGdzmesTrHGxU, etc.). The template does not include these sub-workflows; users must prepare or replace them with direct nodes. 2. The Perplexity node exists in workflow.json but is not mentioned in description.md; it is an additional search tool. 3. The RULES section in the AI Agent systemMessage is empty in the source (title only); actual rules must be supplemented by the user. 4. Timezone is hardcoded to EST (Ottawa); modify to your actual timezone. 5. The conversation partner is hardcoded as Jordan; replace with actual user info. 6. This site has not performed reproduction; reproduction=not_tested. Test API calls and credential permissions in an isolated environment after setup.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • telegram node: connect Telegram Bot Token.
  • telegramTrigger node: connect Telegram Bot Token.
  • perplexityTool node: connect Perplexity API credentials.

Configuration to replace

  • Source template is n8n public workflow #5552 (~12 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Prepare environment and credentials

    Create the following credentials in n8n Settings > Credentials: openRouterApi (for GPT-4o), telegramApi (for trigger and response), serpApi (Google Search), perplexityApi (optional search enhancement). Google API credentials are also needed for Gmail, Calendar, and Contacts tools if used.

  2. Configure Telegram trigger

    Add a Telegram Trigger node, set updates to message, and connect the telegramApi credential. This node receives user Telegram messages as the workflow entry point. Note: source indicates this can be replaced with other triggers.

  3. Configure the AI Agent supervisor node

    Add an AI Agent node (type: @n8n/n8n-nodes-langchain.agent), connect the Telegram Trigger1 output. Set promptType to define, and set the text field to the Telegram message expression. Wire the OpenRouter Chat Model as the language model and Simple Memory as the memory node.

    Execution prompt · Source text。AI Agent node text input field (promptType=define)

    ={{ $('Telegram Trigger1').item.json.message.text }}

    Execution prompt · Source text。AI Agent node systemMessage field (options.systemMessage)

    =# ROLE
    
    You are an AI agent called Ava.
    
    Your job is to orchestrate the activities between different agents and then formulate a friendly response back to the user.
    
    You should never write emails, create contacts, create content, create calendar events, create summaries yourself. Your job is to call agents and tools in the correct sequence.
    
    Think carefully about the sequence of events. Some tools might first require you to call another tool in order to pass it the correct information.
    
    
    The tools are:
    - Calendar
    - Contacts
    - Gmail
    - Google Search 
    - Calculator
    
    
    # ADDITIONAL INFORMATION
    - You are talking to Jordan
    - The current date and time is {{  $now.toString() }}
    - Time zone is EST (Ottawa)
    
    
    
    # RULES
  4. Wire tool nodes

    Connect the following tool nodes to AI Agent via ai_tool: Calculator (math operations), Google Search (SerpApi, credential required), Calendar (toolWorkflow, references external Calendar Agent workflow), Gmail (toolWorkflow, references external Gmail Agent workflow), Contacts (toolWorkflow, references external Contacts Agent workflow), LinkedIn Comment Agent (toolWorkflow, optional), Perplexity (perplexityTool, credential required, model sonar). Each toolWorkflow node needs the corresponding external workflowId and description.

  5. Configure Telegram response and memory

    Add a Telegram node as Response, connect to AI Agent main output. Set text to {{ $json.output }}, chatId to {{ $('Telegram Trigger1').item.json.message.chat.id }}, and disable appendAttribution. Add a Simple Memory node, set sessionKey to {{ $('Telegram Trigger1').item.json.message.chat.id }}, contextWindowLength to 7, and connect as ai_memory to AI Agent.

  6. Test and extend

    Send a message to your Telegram Bot to test tool routing. To extend: add more toolWorkflow agents, replace Telegram with another channel, or adjust timezone and user info in the AI Agent systemMessage.

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant: confirm inputs and permissions first, then reproduce step by step

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

You are assisting with reproducing n8n template 5552: a GPT-4o-based multi-tool AI personal assistant. First confirm you have an n8n instance, OpenRouter/telegram/serpApi/perplexity credentials, and optional Google API credentials. Then import workflow.json or build nodes manually, verifying the AI Agent systemMessage is complete and each toolWorkflow's external workflowId is replaced with your own sub-workflows.

Confirm all API credentials before building; Calendar/Gmail/Contacts are external workflow references—prepare or replace with direct nodes.

Source

AI personal assistant with GPT-4o: Email, calendar, search & CRM integration · jordanlee · n8n.io · 2025-07-01

Comments & feedback

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

Loading…

    Related