Ruthwik
Templates by Ruthwik
Automatic email categorization & labeling in Zoho Mail with GPT-4o-mini
π§ AI-Powered Email Categorization & Labeling in Zoho Mail This n8n template demonstrates how to use AI text classification to automatically categorize incoming emails in Zoho Mail and apply the correct label (e.g., Support, Billing, HR). It saves time by keeping your inbox structured and ensures emails are routed to the right category. Use cases include: Routing customer support requests to the correct team. Organizing billing and finance communications separately. Streamlining HR and recruitment email handling. Reducing inbox clutter and ensuring no important message is missed. --- βΉοΈ Good to know Youβll need to configure Zoho OAuth credentials β see Self Client Overview, Authorization Code Flow, and Zoho Mail OAuth Guide. The labels must already exist in Zoho Mail (e.g., Support, Billing, HR). The workflow fetches these labels and applies them automatically. The Zoho Mail API domain changes depending on your account region: .com β Global accounts (https://mail.zoho.com/api/...) .eu β EU accounts (https://mail.zoho.eu/api/...) .in β India accounts (https://mail.zoho.in/api/...) Example: For an EU account, the endpoint would be: bash https://mail.zoho.eu/api/accounts/<accountID>/updatemessage The AI model used for text classification may incur costs depending on your provider (e.g., OpenRouter). Start by testing with a small set of emails before enabling for your full inbox. --- π How it works A new email in Zoho Mail triggers the workflow. OAuth authentication retrieves access to Zoho Mailβs API. All available labels are fetched, and a label map (display name β ID) is created. The AI model analyzes the subject and body to predict the correct category. The workflow routes the email to the right category branch. The matching Zoho Mail label is applied (final node is deactivated by default). --- π οΈ How to use Create the required labels (e.g., Support, Billing, HR, etc.) in your Zoho Mail account before running the workflow. Replace the Zoho Mail Account ID in the Set Account ID node. Configure your Zoho OAuth credentials in the Get Access Token node. Update the API base URL to match your Zoho accountβs region (.com, .eu, .in, etc.). Activate the Apply Label to Email node once ready for production. Optionally, adjust categories in the AI classifier prompt to fit your organizationβs needs. --- π Requirements Zoho Mail account with API access enabled. Labels created in Zoho Mail for each category you want to classify. OAuth credentials set up in n8n. Correct Zoho Mail API domain (.com, .eu, .in) based on your account region. An AI model (via OpenRouter or other provider) for text classification. --- π¨ Customising this workflow This workflow can be adapted to many inbox management scenarios. Examples include: Auto-routing customer inquiries to specific departments. Prioritizing VIP client emails with special labels. Filtering job applications directly into an HR-managed folder. ---
Create a two-way WhatsApp + Telegram integration for 10k+ customer support chats
β‘ 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: 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. 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 Configure WhatsApp Cloud API Create a Meta Developer account and register a WhatsApp Business number. Generate an access token and phone number ID. 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. Database (Supabase/Postgres) Create a table watgthreads to map phone_e164 β telegramtopicid β supergroup_id. 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. 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. ------------------------------------------------------------------------
AI-powered WhatsApp customer support for Shopify brands with LLM agents
π AI-Powered WhatsApp Customer Support for Shopify Brands This n8n template builds a WhatsApp support copilot that answers order status and product availability from Shopify using LLM "agents," then replies to the customer in WhatsApp or routes to human support. ------------------------------------------------------------------------ Use cases "Where is my order?" β live status + tracking link "What are your best-selling T-shirts?" β in-stock sizes & variants Greetings / small talk β welcome message Anything unclear β handoff to support channel ------------------------------------------------------------------------ Good to know WhatsApp Business conversations are billed by Meta/Twilio/Exotel; plan accordingly. Shopify Admin API has rate limits (leaky bucket) --- stagger requests. LLM usage incurs token costs; cap max tokens and enable caching where possible. Avoid sending PII to the model; only pass minimal order/product fields. ------------------------------------------------------------------------ How it works WhatsApp Trigger\ Receives an incoming message (e.g., "Where is my order?"). Get Customer from Shopify β Customer Details β Normalize Input\ Looks up the customer by phone, formats the query (lower-case, emoji & punctuation normalization). Switch (intent router)\ Classifies into welcome, orderStatusQuery, productQuery, or supportQuery. Welcome path\ Welcome message β polite greeting β (noop placeholder). Order status path (Orders Agent) Orders Agent (LLM + Memory) interprets the user request and extracts needed fields. Get Customer Orders (HTTP to Shopify) fetches the user's latest order(s). Structured Output Parser cleans the agent's output into a strict schema. Send Order Status (WhatsApp message) returns status, ETA, and tracking link. Products path (Products Agent) Products Agent (LLM + Memory) turns the ask into a product query. Get Products from Shopify (HTTP) pulls best sellers / inventory & sizes. Structured Output Parser formats name, price, sizes, stock. Send Products message (WhatsApp) sends a tidy, human-readable reply Support path Send a message to support posts the transcript/context to your agent/helpdesk channel and informs the user a human will respond ------------------------------------------------------------------------ How to use Replace the manual/WhatsApp trigger with your live WhatsApp number/webhook. Set env vars/credentials: Shopify domain + Admin API token, WhatsApp provider keys, LLM key (OpenAI/OpenRouter), and (optionally) your support channel webhook. Edit message templates for tone, add your brand name, and localize if needed. Test with samples: "Where is my order?", "Show best sellers", "Hi". ------------------------------------------------------------------------ Requirements WhatsApp Business API (Meta/Twilio/Exotel) Shopify store + Admin API access LLM provider (OpenAI/OpenRouter etc.) Slack webhook for human handoff ------------------------------------------------------------------------ Prerequisites Active WhatsApp Business Account connected via API provider (Meta, Twilio, or Exotel). Shopify Admin API credentials (API key, secret, store domain). Slack OAuth app or webhook for human support escalation. API key for your LLM provider (OpenAI, OpenRouter, etc.). ------------------------------------------------------------------------ Customising this workflow Add intents: returns/exchanges, COD confirmation, address changes. Enrich product replies with images, price ranges, and "Buy" deep links. Add multilingual support by detecting locale and templating responses. Log all interactions to a DB/Sheet for analytics and quality review. Guardrails: confidence thresholds β fallback to support; redact PII; retry on API errors.