Back to Templates

Auto-reply to Telegram messages using BrowserAct and Google Gemini

Last update

Last update 6 hours ago

Share


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

  1. Scheduled Check: Every 15 minutes, the workflow triggers BrowserAct to fetch the latest chat history.
  2. 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.
  3. Drafting: If a reply is needed, the AI drafts a personalized message that includes the user's name and a standard footer disclaimer.
  4. Formatting: A Code node cleans up the text to ensure proper line breaks and formatting for Telegram.
  5. 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

  1. Configure Credentials: Connect your BrowserAct and Google Gemini accounts in n8n.
  2. Prepare BrowserAct: Ensure the Telegram Personal Assistant template is saved in your BrowserAct account.
  3. Set Schedule: The default trigger interval is 15 minutes. Adjust the Schedule Trigger node if you need a different frequency.
  4. 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

  1. 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."
  2. Adjust Frequency: Change the Schedule Trigger interval to run every 5 minutes for faster responses or hourly for less urgency.
  3. Add Notification: Add a Slack or Email node after the delivery step to get notified whenever the bot sends a reply.

Need Help?


Workflow Guidance and Showcase Video