Automate Telegram Meetup Scheduling with n8n and AI

This workflow automates managing meetup schedules via a Telegram bot powered by n8n and AI. It saves organizers hours by fetching Google Sheets data, converting schedules to markdown, and providing instant chat responses with AI context-based intelligence.
telegramTrigger
googleSheets
agent
+7
Workflow Identifier: 1704
NODES in Use: telegramTrigger, telegram, set, googleSheets, code, agent, lmChatOpenRouter, memoryBufferWindow, switch, noOp

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Sarah, an active meetup organizer for a popular tech group in Da Nang. Every time a member asks about upcoming meetup schedules, Sarah spends 10-15 minutes searching through a Google Spreadsheet, copying the schedule, and typing out the response. Multiply that by dozens of daily queries, and she loses several hours weekly that could be better spent planning or networking.

Moreover, manual responses sometimes lead to outdated or incorrect information being shared, frustrating members and affecting attendance. Sarah needs an automated, reliable way to instantly answer schedule questions directly in Telegram where her community interacts most.

What This Automation Does

This n8n workflow creates an intelligent Telegram bot integrated with AI that can:

  • Respond instantly in Telegram chats when members ask about meetup schedules.
  • Fetch the latest schedule data from a Google Sheets document automatically.
  • Convert the schedule data into a markdown table that AI can understand and use as context.
  • Use an AI agent (LangChain-based) to generate accurate, context-aware responses about the schedule.
  • Indicate when the bot is “typing” in Telegram to provide a smoother chat experience.
  • Support multiple chat input sources and toggle response routing based on chat origin (Telegram or internal n8n chat).

This results in hours saved every week, improved response accuracy, and a professional, automated member interaction experience.

Prerequisites ⚙️

  • n8n account (cloud or self-hosted) for workflow automation.
  • Telegram Bot API credentials to connect and send messages.
  • Google Sheets account with OAuth credentials for reading schedule data.
  • OpenRouter account for AI large language model (LLM) processing.
  • Basic familiarity with n8n interface.

📁 If you prefer self-hosting n8n, consider providers like Hostinger.

Step-by-Step Guide

Step 1: Set Up Telegram Trigger Node

Navigate to the nodes panel and add the Telegram Trigger node named telegramInput. Configure it to listen to incoming “message” updates. Connect your Telegram API credentials here.

This node listens for any message sent to your Telegram bot and starts the workflow.

Common mistake: Forgetting to select the correct “message” update type will prevent the bot from responding.

Step 2: Simulate Typing Action with SendTyping Node

Add a Telegram node named SendTyping. Set Operation to “sendChatAction” with the chat ID passed from telegramInput. This node simulates the bot “typing…” in the chat to enhance user experience.

Step 3: Normalize Telegram Input

Add a Set node (telegramChatSettings) that extracts the text message and chat ID from the telegram input. Set mode as “telegram” for later conditional routing.

Step 4: Normalize Internal Chat Input

Add a LangChain Chat Trigger node named n8nInput to handle chats triggered internally inside n8n. Then add a Set node (n8nChatSettings) to extract message and session ID, set mode as “n8n”.

Step 5: Set Workflow Settings

Add a Set node (Settings) to store static data such as your Google Sheets schedule URL and the mode (from previous inputs). This node centralizes your settings for easier management.

Step 6: Fetch Schedule from Google Sheets

Add a Google Sheets node named Schedule configured to read from your schedule spreadsheet URL, sheet “gid=0” (first sheet). Make sure you connect your Google Sheets OAuth credentials.

This node retrieves the latest schedule data as JSON.

Step 7: Convert Schedule Data to Markdown Table with Code Node

Add a Code node named ScheduleToMarkdown after the Google Sheets node. Paste the following JavaScript code to transform the JSON rows into a markdown table:

// Get all rows from the input (each item has a "json" property)
const rows = items.map(item => item.json);

// If no data, return an appropriate message
if (rows.length === 0) {
 return [{ json: { markdown: "No data available." } }];
}

// Use the keys from the first row as the header columns
const headers = Object.keys(rows[0]);

// Build the markdown table string
let markdown = "";

// Create the header row
markdown += `| ${headers.join(" | ")} |n`;

// Create the separator row (using dashes for markdown)
markdown += `| ${headers.map(() => '---').join(" | ")} |n`;

// Add each data row to the table
rows.forEach(row => {
 // Ensure we output something for missing values
 const rowValues = headers.map(header => row[header] !== undefined ? row[header] : '');
 markdown += `| ${rowValues.join(" | ")} |n`;
});

const result = { 'binary': {}, 'json': {} };

// Optionally, also return the markdown string in the json property if needed
result.json.markdown = markdown;

return result;

This script generates a markdown table string for the AI to use as context.

Step 8: Use LangChain Agent for AI-Powered Responses

Add the LangChain Agent node named ScheduleBot. Configure it with your input message, and set the system message to explain it’s a helpful assistant for answering meetup schedule questions using the markdown table provided.

Step 9: Attach AI Large Language Model (LLM) Node and Memory

Add LLM node (OpenRouter chat) and Memory Buffer node connected to the ScheduleBot. This enables contextual AI responses with chat history using OpenRouter’s API.

Step 10: Set Response Message

Add a Set node (SetResponse) that collects the AI output as the response message.

Step 11: Switch Node to Choose Response Channel

Add a Switch node that checks the mode from Settings. Routes output to either Telegram response or internal n8n response handlers.

Step 12: Telegram Response Node

Add a Telegram node (telegramResponse) configured to send the AI-generated response back to the Telegram chat using chat ID from settings.

Step 13: Internal n8n Response Node

Add a No Operation node (n8nResponse) for internal chat mode, which could be expanded later.

Customizations ✏️

  • Change Schedule Source: In the Settings node, update the scheduleURL property to point to a different Google Sheets document to manage a different meetup group.
  • Adjust AI Personality: Modify the systemMessage in the ScheduleBot LangChain node to change how the assistant replies, tailoring tone or detail level.
  • Add More Chat Platforms: Add additional trigger and settings nodes for Slack or Discord and expand the Switch node to route accordingly.
  • Enable Markdown Output to Users: Adapt the SetResponse node to send back raw markdown if your Telegram clients support it.

Troubleshooting 🔧

Problem: Telegram Bot Not Responding

Cause: Incorrect Telegram Trigger node setup or bad API credentials.

Solution: Recheck webhook registration, ensure “message” updates selected, and verify correct Telegram API credentials under the Telegram Trigger and Telegram nodes.

Problem: Google Sheets Data Not Loading

Cause: Wrong sheet ID or insufficient OAuth permissions.

Solution: Verify your Google Sheets URL in the Settings node, make sure your OAuth token has read access, and check the spreadsheet’s sharing settings.

Problem: AI Responses Lack Context

Cause: Schedule markdown not properly passed or memory node misconfigured.

Solution: Inspect connections between ScheduleToMarkdown, ScheduleBot, and Memory nodes. Confirm that the markdown is included in the system message and memory buffer uses chatId as session key.

Pre-Production Checklist ✅

  • Confirm Telegram bot webhook is active and receiving “message” updates.
  • Verify Google Sheets access and that schedule data is up-to-date.
  • Test AI with sample input messages and review response accuracy.
  • Check routing in Switch node by testing both Telegram and n8n chat inputs.

Deployment Guide

Activate the workflow in n8n and ensure the Telegram bot webhook URL is publicly accessible. Monitor the workflow execution in n8n for any errors.

Consider logging responses for future audits or improvements by adding nodes to save chat history.

FAQs

Can I use a different AI provider instead of OpenRouter?

Yes. You can replace the LLM node with any supported AI provider in LangChain nodes, such as OpenAI, Cohere, or Hugging Face, adjusting credentials accordingly.

Is my Google Sheet data secure?

Only authorized OAuth tokens are used and data is never publicly exposed. Make sure your Google Sheet sharing settings are properly configured.

How scalable is this bot?

This setup handles typical meetup group sizes well. For very large volumes, consider adding caching or rate limiting to avoid API quota limits.

Conclusion

By building this Telegram scheduling bot with n8n and AI, you’ve automated a time-consuming manual task. Your meetup members get instant, accurate schedule updates right in their chat app, saving you hours weekly and improving member satisfaction.

Next, you might explore adding calendar integrations for RSVP tracking or connecting with Slack to widen your community support. Keep automating to focus more on what matters—building great events.

Happy automating!

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free