Telegram Sales Agent for Business
detail.loadingPreview
Automate sales and order processing via Telegram using an AI agent, with multilingual support and seamless Google Sheets integration.
About This Workflow
This n8n workflow transforms your Telegram into a sophisticated sales agent. It leverages Langchain's AI capabilities to understand customer orders, manage them, and process payments through a human approval loop. The workflow is designed to be highly customizable, allowing you to define your business details, menu, pricing, and currency. It also supports multilingual interactions and logs all order data directly to Google Sheets for easy management.
Key Features
- AI-Powered Order Taking: Utilizes a Langchain AI agent to converse with customers, understand their orders, and respond politely.
- Multilingual Support: Prompts are structured to allow for easy adaptation to different languages (though currently configured primarily for English and placeholder for Chinese).
- Dynamic Menu & Pricing: Easily configure your business name, location, currency, menu items, and prices within the AI agent's system message.
- Payment Verification Workflow: Captures payment screenshots and initiates a human approval process via Telegram.
- Google Sheets Integration: Automatically logs all confirmed orders with detailed information to a specified Google Sheet.
- Conversation Memory: Implements session-based memory to maintain context during customer interactions.
- Human-in-the-Loop Approval: Requires admin approval for payments, ensuring security and accuracy.
- Customizable Responses: Predefined responses for status inquiries, agent requests, and general FAQs.
How To Use
Setup Guide:
Prerequisites:
- An n8n instance (cloud or self-hosted).
- A Telegram Bot Token (created via BotFather).
- Google Sheets API access and credentials.
- Google Gemini API key.
Step 1: Replace Placeholders
Locate and replace all bracketed placeholders (e.g., [YOUR_BUSINESS_NAME], [YOUR_CURRENCY], [PRICE_1]) within the AI Agent node's system message with your specific business details, menu items, and pricing.
- Business Information:
[YOUR_BUSINESS_NAME],[ASSISTANT_NAME],[YOUR_CITY],[YOUR_COUNTRY],[YOUR_ADDRESS],[YOUR_PHONE],[YOUR_EMAIL],[YOUR_HOURS] - Currency & Localization:
[YOUR_CURRENCY],[CURRENCY_SYMBOL],[YOUR_TIMEZONE],[PREFIX] - Menu Items:
[CATEGORY_1],[ITEM_1]to[ITEM_8],[PRICE_1]to[DELIVERY_FEE] - Payment & Support:
[YOUR_PAYMENT_DETAILS],[YOUR_PAYMENT_PROVIDER],[YOUR_SUPPORT_HANDLE]
Step 2: Configure Credentials
- Telegram Trigger & Telegram Nodes: Configure these nodes with your Telegram Bot Token.
- Google Sheets Node (
Google Sheets): Connect your Google account and specify thedocumentIdfor your order tracking spreadsheet (replace[YOUR_GOOGLE_SHEET_ID]). Ensure the sheet name is correct. - Google Gemini Node (
Google Gemini Chat Model): Add your Google Gemini API key.
Step 3: Workflow Logic Overview
Telegram Trigger: Receives incoming messages from Telegram.Payment Screenshot Check: Determines if the message contains a photo (payment screenshot) or text.- If Photo:
Forward Payment Screenshot: Forwards the screenshot to an admin or designated chat.Admin Approval Request: Sends a prompt to an admin for approval.Check Feedback: Classifies the admin's response as 'approved' or 'declined'.- If Approved:
AI Agent: Confirms payment and order, calculates delivery time, and sends a confirmation message.Google Sheets: Logs the complete order details.
- If Declined:
Payment Declined: Notifies the customer that the payment could not be verified.
- If Text:
Simple Memory: Stores conversation history.AI Agent: Processes the text input, interacts with the customer based on the system message and memory.Telegram: Sends the AI agent's response back to the customer.
Step 4: Testing & Deployment
- Import this workflow into your n8n instance.
- Activate the workflow.
- Test the entire conversation flow with a test Telegram account.
- Verify that order data is correctly logged in your Google Sheet.
- Test the payment approval and rejection scenarios.
Node Explanations:
Telegram Trigger: Listens for new messages on your Telegram bot.Payment Screenshot Check: AnIFnode to branch logic based on message type (text vs. photo).Forward Payment Screenshot: Forwards received photos.Admin Approval Request: Sends a message to an admin and waits for a text response.Check Feedback: Uses a Langchain Text Classifier to categorize the admin's approval/rejection.Simple Memory:BufferWindowMemoryfor Langchain to store recent conversation turns.AI Agent: The core Langchain Agent using Google Gemini to handle customer interactions and business logic.Google Gemini Chat Model: The underlying language model for the AI Agent.Telegram: Sends responses back to the customer.Payment Declined: Sends a predefined message for failed payments.Google Sheets: Appends confirmed order data to your spreadsheet.
Apps Used
Workflow JSON
{
"id": "4514e8de-44c8-40b7-9940-df4e163cbb84",
"name": "Telegram Sales Agent for Business",
"nodes": 12,
"category": "Sales",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 4514e8de-44c8...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Typeform to HubSpot Lead Qualification & Gmail Follow-up
Streamline your lead capture process by automatically syncing Typeform submissions to HubSpot. Qualify leads based on their interest and send personalized follow-up emails instantly. This workflow ensures no lead is missed and interested prospects receive immediate attention.
Automate LinkedIn Job Change Monitoring and Role Classification
Proactively track career shifts within your LinkedIn network. This n8n workflow utilizes Airtop to automatically extract detailed job change information, including new positions, LinkedIn profiles, and functional classifications, enabling timely outreach and CRM updates.
Automated Smart Lead Qualification and Hot Lead Alerts
Instantly qualify inbound leads from your forms by automatically verifying emails, scoring customer fit with MadKudu, and alerting your sales team about high-potential prospects via Gmail. Streamline your lead funnel and ensure your sales team focuses on the hottest opportunities.