AI Event Q&A Bot for Telegram & Google Sheets
Integrates with:
Overview
Unlock Effortless Event & Meetup Q&A with this AI Agent
This n8n workflow transforms your Google Sheet schedule into an intelligent Telegram bot. Users can ask questions in natural language (e.g., "What's happening next week?", "Tell me about the AI workshop"), and the AI Agent, powered by Langchain and an LLM via OpenRouter, will provide relevant answers. It dynamically fetches data from your Google Sheet, converts it to a Markdown table for better LLM understanding, and delivers responses directly in Telegram. It also includes an n8n chat trigger for easy testing.
Key Features & Benefits
- Interactive Telegram Bot: Engages users directly within Telegram, making schedule information highly accessible.
- Google Sheets as a Single Source of Truth: Dynamically pulls the latest event or meetup data directly from your designated Google Sheet. No more manual updates in multiple places!
- AI-Powered Q&A: Leverages Langchain and a Large Language Model (LLM via OpenRouter) to understand user questions and provide accurate, context-aware answers about the schedule.
- Contextual Understanding: Automatically converts your Google Sheet data into Markdown format, providing structured context to the LLM for improved response quality.
- Conversational Memory: Remembers previous parts of the chat interaction for a more natural and helpful user experience.
- Dual Input Ready: Can be triggered via Telegram for live use or via n8n's built-in Chat Trigger for development and testing.
- Enhanced User Experience: Includes a 'typing...' indicator in Telegram while processing requests.
Use Cases
- Providing instant answers to community members about upcoming meetups via Telegram.
- Automating responses to frequently asked questions about event schedules.
- Allowing team members to quickly query project timelines or internal event schedules.
- Powering an information bot for conferences or workshops based on a master schedule sheet.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- Telegram Bot API Token.
- Google OAuth2 credentials with permissions to read Google Sheets.
- A Google Sheet publicly accessible or shared with the service account, containing your schedule/event data (the first row should be headers).
- An OpenRouter API Key (or credentials for another LLM provider if you modify the LLM node).
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Telegram Configuration:
- Open the 'telegramInput' (Telegram Trigger) node and configure it with your Telegram Bot API Token.
- Open the 'SendTyping' and 'telegramResponse' (Telegram) nodes and select or create the same Telegram Bot credentials.
- Google Sheets Configuration:
- In the 'Settings' node, update the
scheduleURL
variable with the full URL of your Google Sheet. - Open the 'Schedule' (Google Sheets) node and configure it with your Google OAuth2 credentials. Ensure the Sheet Name/ID within this node matches your target sheet (default is 'Schedule' or 'gid=0').
- In the 'Settings' node, update the
- AI Configuration:
- Open the 'LLM' (lmChatOpenRouter) node and enter your OpenRouter API Key in the credentials section.
- Review the system prompt in the 'ScheduleBot' (Langchain Agent) node. Customize it to better suit your schedule's content and desired bot persona (e.g., how it should refer to events, its tone).
- Memory Configuration (Optional):
- Adjust settings in the 'Memory' (memoryBufferWindow) node if you need different conversation memory behavior (e.g., number of past messages to remember).
- Save and activate the workflow.
- Test by sending a message to your Telegram bot or by using the 'n8nInput' (Chat Trigger) node manually within n8n (click 'Test step').
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation