An AI-powered Telegram bot that automates customer support for e-commerce stores — handling order tracking, order cancellations, and support ticket creation, all without human intervention.
Built with a Gemini AI Agent + Simple Memory, the bot understands natural language, remembers the conversation context per user, and reads/writes directly to your Google Sheets — no database or backend required.
Cancelled after confirmationStep 1 — Create a Telegram Bot
Open @BotFather on Telegram, run /newbot, and copy your bot token. Add it as a Telegram credential in n8n.
Step 2 — Set Up Google Sheets
Create a Google Spreadsheet with two sheets (tabs):
Sheet 1 — Sheet1 (Orders):
| order_id | customer_name | email | product | Status | date |
Sheet 2 — Sheet1 (Support Tickets — separate spreadsheet):
| ticket_id | name | order_id | query | summary | category | status | created_at | telegram_id |
Step 3 — Add Credentials in n8n
Step 4 — Update Sheet IDs
In the three Google Sheets tool nodes, replace the documentId values with your actual spreadsheet IDs (found in the Google Sheets URL).
Step 5 — Activate & Register Webhook
Activate the workflow in n8n. If running locally, use ngrok to expose your n8n port over HTTPS, then register the webhook:
https://api.telegram.org/bot<YOUR_TOKEN>/setWebhook?url=https://<YOUR_NGROK_URL>/webhook/telegram-ecom-bot
Step 6 — Test
Open your bot in Telegram and send /start. You should see the welcome message with three menu buttons.
Google Gemini Chat Model node/start welcome node with additional inline keyboard buttons and update the system prompt to handle new intentsCreate Support Ticket tool to notify your team when a new ticket is raisedReady in addition to Shipped)phone column and update the system prompt accordingly