Back to Catalog

Create a two-way WhatsApp + Telegram integration for 10k+ customer support chats

RuthwikRuthwik
980 views
2/3/2026
Official Page

⚡ Next-Gen Customer Support: Two-Way WhatsApp + Telegram Integration for 10k+ Clients


Who is this workflow for

This workflow is designed for customer support teams, e-commerce founders, and operations managers who want to handle thousands of customer queries seamlessly. Instead of building a brand-new chat application, it leverages WhatsApp (where customers already are) and Telegram (where your support team operates) to create a scalable, topic-based support system.

If you are a brand handling 1000s of daily WhatsApp customer messages and need a structured way to map each customer into a dedicated support thread without chaos, this workflow is for you.


What it does / How it works

This two-way n8n automation bridges WhatsApp and Telegram by creating one Telegram forum topic per customer and syncing messages both ways:

  1. Incoming WhatsApp → Telegram
    • When a new WhatsApp message arrives, the workflow checks if the customer already has a topic in Telegram.
    • If yes → The message is forwarded into that existing topic.
    • If no → A new topic is created automatically, the mapping is saved in the database, and the message is posted there.
    • Result: every customer has a dedicated thread in your Telegram supergroup.
  2. Outgoing Telegram → WhatsApp
    • When a support agent replies in a Telegram topic, the workflow looks up the linked WhatsApp number.
    • The reply is sent back to the customer on WhatsApp, preserving context.
    • Result: two-way synced conversations without building a custom app.

How to set it up

  1. Configure WhatsApp Cloud API
    • Create a Meta Developer account and register a WhatsApp Business number.
    • Generate an access token and phone number ID.
  2. Configure Telegram Bot
    • Use BotFather to create a bot and enable it in a Telegram Supergroup with Topics.
    • Get the chat_id and allow the bot to create/send messages in topics.
  3. Database (Supabase/Postgres)
    • Create a table wa_tg_threads to map phone_e164telegram_topic_idsupergroup_id.
  4. n8n Workflows
    • Workflow A: WhatsApp → Telegram
      • Trigger: WhatsApp Webhook
      • Steps: Lookup customer → If exists send to topic, else create topic → Save mapping → Forward message.
    • Workflow B: Telegram → WhatsApp
      • Trigger: Telegram Webhook
      • Steps: Filter only topic replies → Lookup mapping → Send WhatsApp message.
  5. Testing
    • Send a WhatsApp message → Check Telegram topic created.
    • Reply in Telegram topic → Ensure customer receives WhatsApp reply.

Requirements

  • A free or paid n8n instance (self-hosted or cloud).
  • WhatsApp Cloud API credentials (phone number ID + access token).
  • Telegram Bot token with access to a Supergroup with Topics enabled.
  • A Postgres/Supabase database to store thread mappings.
  • Basic familiarity with editing HTTP Request nodes in n8n.

How to customize the workflow

  • Brand personalization: Pre-populate first message templates (thank you, order status, delivery updates).
  • Routing rules: Assign specific agents to certain topics by ID ranges.
  • Integrations: Extend to CRMs (HubSpot, Zoho) or support platforms (Freshdesk, Zendesk).
  • Notifications: Push high-priority WhatsApp queries into Slack/Teams for instant alerts.
  • Archival: Auto-close inactive topics after N days and mark customers as dormant.

Why Telegram instead of building a new App

The client's requirement was clear: use an existing, reliable, and scalable chat platform instead of building a new app from scratch.

  • Telegram Supergroups with Topics scale to 100,000+ members and millions of messages, making them ideal for managing 10k+ customer threads.
  • Agents don't need to install or learn a new tool---they continue inside Telegram, which is fast, free, and mobile-friendly.
  • Building a custom chat app would require authentication, push notifications, scaling infra, and UX---all solved instantly by Telegram.

This decision saves development cost, accelerates deployment, and provides proven scalability.


Why this improves support productivity

  • Organized by customer: Each WhatsApp number has its own Telegram topic.
  • No missed messages: Agents can quickly scroll topics without drowning in one endless chat.
  • Two-way sync: Replies flow back to WhatsApp seamlessly.
  • Scales automatically: Handle 10k+ conversations without losing track.
  • Leverages existing tools: WhatsApp (customers) + Telegram (agents).

Result: faster responses, better tracking, and zero need to reinvent chat software.


Two-Way WhatsApp & Telegram Integration for Customer Support

This n8n workflow establishes a seamless two-way communication bridge between WhatsApp and Telegram, enabling customer support teams to manage chats efficiently across both platforms. It acts as a central hub, forwarding messages from one platform to the other and ensuring that responses are routed back to the original sender.

What it does

This workflow automates the following steps:

  1. Listens for Incoming WhatsApp Messages: It triggers whenever a new message is received on a configured WhatsApp Business Cloud account.
  2. Sets Message Type: It categorizes the incoming message as "whatsapp" and extracts relevant details like the sender's phone number and the message content.
  3. Forwards to Telegram: It sends the WhatsApp message to a designated Telegram chat or channel, allowing support agents to view and respond from Telegram.
  4. Listens for Incoming Telegram Messages: Simultaneously, it triggers when a new message is received in a configured Telegram bot.
  5. Sets Message Type: It categorizes the incoming message as "telegram" and extracts details such as the sender's chat ID and the message content.
  6. Checks for Existing Conversation: It queries a Supabase database to determine if there's an ongoing conversation associated with the Telegram sender.
  7. Filters for WhatsApp Replies: If the Telegram message is a reply to a WhatsApp conversation (i.e., a record exists in Supabase), it proceeds to forward the message.
  8. Forwards to WhatsApp: It sends the Telegram reply back to the original WhatsApp sender using the WhatsApp Business Cloud API.
  9. Handles New Telegram Conversations (Future Expansion): The workflow has a branch for new Telegram conversations, allowing for future expansion to handle these differently (e.g., creating new tickets).
  10. Merges Workflow Paths: It combines the processing paths for both WhatsApp and Telegram messages to ensure a unified flow.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • WhatsApp Business Cloud Account: Configured with a phone number and API access.
  • Telegram Bot: A Telegram bot token and the chat ID of the support channel/group.
  • Supabase Account: A Supabase project with a table to store conversation metadata (e.g., mapping Telegram chat IDs to WhatsApp phone numbers).
  • HTTP Request Node: For making API calls to external services if needed (though the current JSON doesn't explicitly show external API calls beyond WhatsApp/Telegram).

Setup/Usage

  1. Import the workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • WhatsApp Trigger & WhatsApp Business Cloud: Set up your WhatsApp Business Cloud credentials in n8n.
    • Telegram Trigger: Configure your Telegram bot credentials.
    • Supabase: Set up your Supabase credentials, including your Supabase URL and API Key.
  3. Configure Nodes:
    • WhatsApp Trigger (Node 1260): Ensure the webhook URL is correctly set up in your WhatsApp Business Cloud configuration.
    • Telegram Trigger (Node 50): Ensure the bot is added to your support group/channel and the webhook is configured.
    • Edit Fields (Set) (Node 38): Verify the fields being set for messageType, sender, and text align with your data structure.
    • Supabase (Node 545): Configure the Supabase node to query your conversation mapping table. You might need to adjust the table name and query parameters.
    • If (Node 20): Adjust the conditions to accurately determine if a Telegram message is a reply to a WhatsApp conversation based on your Supabase data.
    • HTTP Request (Node 19): This node is currently present but not connected in the provided JSON. If you intend to use it for further API calls (e.g., to a CRM), configure its URL, method, and headers.
  4. Activate the Workflow: Once all configurations are complete, activate the workflow.

This setup will enable your customer support team to respond to WhatsApp messages directly from Telegram, streamlining communication and centralizing support efforts.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Synchronizing WooCommerce inventory and creating products with Google Gemini AI and BrowserAct

Synchronize WooCommerce Inventory & Create Products with Gemini AI & BrowserAct This sophisticated n8n template automates WooCommerce inventory management by scraping supplier data, updating existing products, and intelligently creating new ones with AI-formatted descriptions. This workflow is essential for e-commerce operators, dropshippers, and inventory managers who need to ensure their product pricing and stock levels are synchronized with multiple third-party suppliers, minimizing overselling and maximizing profit. --- Self-Hosted Only This Workflow uses a community contribution and is designed and tested for self-hosted n8n instances only. --- How it works The workflow is typically run by a Schedule Trigger (though a Manual Trigger is also shown) to check stock automatically. It reads a list of suppliers and their inventory page URLs from a central Google Sheet. The workflow loops through each supplier: A BrowserAct node scrapes the current stock and price data from the supplier's inventory page. A Code node parses this bulk data into individual product items. It then loops through each individual product found. The workflow checks WooCommerce to see if the product already exists based on its name. If the product exists: It proceeds to update the existing product's price and stock quantity. If the product DOES NOT exist: An If node checks if the missing product's category matches a predefined type (optional filtering). If it passes the filter, a second BrowserAct workflow scrapes detailed product attributes from a dedicated product page (e.g., DigiKey). An AI Agent (Gemini) transforms these attributes into a specific, styled HTML table for the product description. Finally, the product is created in WooCommerce with all scraped details and the AI-generated description. Error Handling: Multiple Slack nodes are configured to alert your team immediately if any scraping task fails or if the product update/creation process encounters an issue. Note: This workflow does not support image uploads for new products. To enable this functionality, you must modify both the n8n and BrowserAct workflows. --- Requirements BrowserAct API account for web scraping BrowserAct n8n Community Node -> (n8n Nodes BrowserAct) BrowserAct templates named “WooCommerce Inventory & Stock Synchronization” and “WooCommerce Product Data Reconciliation” Google Sheets credentials for the supplier list WooCommerce credentials for product management Google Gemini account for the AI Agent Slack credentials for error alerts --- Need Help? How to Find Your BrowseAct API Key & Workflow ID How to Connect n8n to Browseract How to Use & Customize BrowserAct Templates How to Use the BrowserAct N8N Community Node --- Workflow Guidance and Showcase STOP Overselling! Auto-Sync WooCommerce Inventory from ANY Supplier

Madame AI Team | KaiBy Madame AI Team | Kai
600