Quick overview
This workflow uses a Telegram bot, Google Gemini, Google Calendar, and Google Sheets to automatically reply to customers, answer FAQ/price questions, and create appointments in Google Calendar, while notifying the business owner when an appointment is booked or human support is needed.
How it works
- Triggers when a new Telegram message is received.
- Extracts the Telegram chat ID, message text, and sender name and passes them to a Google Gemini-powered AI agent with short-term conversation memory.
- Depending on intent, the AI agent queries Google Calendar for availability and creates a Google Calendar event when the user confirms a time, or searches a Google Sheets FAQ/pricing document to draft a concise answer.
- Sends the AI-generated reply back to the customer on Telegram, removing internal tags from the visible message.
- If the reply indicates an appointment was created, sends a Telegram notification to the business owner with the customer details.
- If the reply indicates a complaint or a need for human support, sends a Telegram alert to the business owner with the message details.
Setup
- Create and connect Telegram credentials, then enable the Telegram Trigger so your bot can receive messages.
- Add Google Calendar OAuth2 credentials, ensure the target calendar (for example, "primary") is correct, and confirm the workflow has permission to read availability and create events.
- Add Google Sheets OAuth2 credentials and replace
GOOGLE_SHEETS_FAQ_DOC_ID and the target sheet name with your FAQ/pricing spreadsheet details.
- Add Google Gemini (Google AI) credentials for the chat model used by the AI agent.
- Replace
BUSINESS_OWNER_TELEGRAM_CHAT_ID with the Telegram chat ID that should receive appointment and complaint notifications.