Auto-reply to Telegram messages using BrowserAct and Google Gemini

Go to Workflow
12 views
Built by Madame AI Team | Kai Madame AI Team | Kai
Created on June 05, 2026

Description

Auto-reply to Telegram messages using BrowserAct & Google Gemini

This workflow acts as a smart, 24/7 personal assistant for your Telegram chats. It runs on a schedule to monitor your message history, uses AI to decide if a reply is necessary, drafts a personalized response, and sends it back to the user, all while handling delivery verification and potential CAPTCHA challenges via BrowserAct.

Target Audience
Community managers, busy professionals, and customer support teams who need to manage Telegram communications efficiently.

How it works
Scheduled Check: Every 15 minutes, the workflow triggers BrowserAct to fetch the latest chat history.
Analysis: An AI Agent (using Google Gemini) reviews the conversation. It determines if the last message requires a response (e.g., a question) or if the chat is idle.
Drafting: If a reply is needed, the AI drafts a personalized message that includes the user's name and a standard footer disclaimer.
Formatting: A Code node cleans up the text to ensure proper line breaks and formatting for Telegram.
Delivery: BrowserAct executes the task to send the drafted reply. The workflow loops to check the task status, ensuring the message is delivered successfully.

How to set up
Configure Credentials: Connect your BrowserAct and Google Gemini accounts in n8n.
Prepare BrowserAct: Ensure the Telegram Personal Assistant template is saved in your BrowserAct account.
Set Schedule: The default trigger interval is 15 minutes. Adjust the Schedule Trigger node if you need a different frequency.
Activate: Turn on the workflow to start monitoring your chats.

Requirements
BrowserAct* account with the *Telegram Personal Assistant** template.
Google Gemini** account.
Telegram** account (accessed via BrowserAct).

How to customize the workflow
Change AI Persona: Modify the system prompt in the Chatting & Answering AI agent to change the tone from "Professional Support" to "Casual Assistant" or "Sales Representative."
Adjust Frequency: Change the Schedule Trigger interval to run every 5 minutes for faster responses or hourly for less urgency.
Add Notification: Add a Slack or Email node after the delivery step to get notified whenever the bot sends a reply.

Need Help?
How to Find Your BrowserAct API Key & Workflow ID
How to Connect n8n to BrowserAct
How to Use & Customize BrowserAct Templates

Workflow Guidance and Showcase Video

Telegram Personal Assistant: Auto-Read Chats & Auto-Reply them with n8n


Nodes Used (5)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
HTTP Request
n8n-nodes-base.httpRequest
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured