{"product_id":"whatsapp-telegram-chat-routing-with-gpt-4o-google-sheets","title":"WhatsApp \u0026 Telegram Chat Routing with GPT-4o + Google Sheets","description":"\u003ch3\u003eRoute WhatsApp \u0026amp; Telegram chats to a GPT-4o multi-agent assistant—with Google Sheets updates\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow captures inbound \u003cstrong\u003eWhatsApp\u003c\/strong\u003e and \u003cstrong\u003eTelegram\u003c\/strong\u003e messages, routes them through an \u003cstrong\u003eOpenAI GPT-4o\u003c\/strong\u003e multi-agent assistant, and uses \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e plus \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e to log, validate, and (optionally) sync product updates—while alerting admins and responding back to the user.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers\u003c\/strong\u003e on inbound messages from WhatsApp or Telegram (or supports a manual sample run) and normalizes them into a common sender\/message format.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoads your configured business profile\u003c\/strong\u003e, determines whether the sender is a customer, supplier, or admin, and \u003cstrong\u003ede-duplicates\u003c\/strong\u003e events by claiming the message in \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf the message is an \u003cstrong\u003eauthorized Telegram admin command\u003c\/strong\u003e, it applies \u003cstrong\u003eapprove\/reject\u003c\/strong\u003e decisions in PostgreSQL and confirms the result back to the admin in Telegram.\u003c\/li\u003e\n  \u003cli\u003eOtherwise, it retrieves \u003cstrong\u003eapproved knowledge\u003c\/strong\u003e and recent conversation history from PostgreSQL, then sends packaged context to a \u003cstrong\u003emain GPT-4o agent\u003c\/strong\u003e that delegates to \u003cstrong\u003eup to six specialist agents\u003c\/strong\u003e that can read relevant \u003cstrong\u003eGoogle Sheets tabs\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eApplies a \u003cstrong\u003estrict policy layer\u003c\/strong\u003e to validate and constrain the proposed intent\/actions, then writes the approved plan and any resulting records to PostgreSQL.\u003c\/li\u003e\n  \u003cli\u003eIf a \u003cstrong\u003eproduct row changed\u003c\/strong\u003e, it \u003cstrong\u003esynchronizes the updated product data\u003c\/strong\u003e to the \u003cstrong\u003eProducts\u003c\/strong\u003e tab in Google Sheets.\u003c\/li\u003e\n  \u003cli\u003eSends a \u003cstrong\u003eTelegram admin alert\u003c\/strong\u003e when actions or manual-review notes exist, and—when enabled—replies to the sender on the original channel (Telegram or WhatsApp).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSupport teams triaging customer questions from WhatsApp\/Telegram with context-aware responses.\u003c\/li\u003e\n  \u003cli\u003eOps workflows where product decisions require admin approve\/reject before changes take effect.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators who want conversation history + action logs stored in PostgreSQL and product updates reflected in Google Sheets.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/tools:\u003c\/strong\u003e if, code, postgres, telegram, whats app, sticky note\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore systems:\u003c\/strong\u003e PostgreSQL for deduping, approval state, and conversation history; Google Sheets for approved knowledge and product sync (Products tab)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI layer:\u003c\/strong\u003e GPT-4o via a main agent with up to six specialist agents, governed by a strict policy layer\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46123200118963,"sku":"N8N-20101","price":65.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/5v48LfyHyIGVArS_k1jYV_m4aXg5q3.png?v=1790673403","url":"https:\/\/buyflowscripts.com\/products\/whatsapp-telegram-chat-routing-with-gpt-4o-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}