Condition: detect language

Learn how to use the Detect language node in your workflows to route every conversation by the contact's language, with no manual rules.

Jun 26, 2026

Watch this step in the video · Detect language and agent in team

What it is and when to use it

The Detect language node is a condition (router) node that figures out the contact's language and sends the conversation down a different branch for each one. Use it when you serve customers across countries and want each to get replies, assignments or AI agents in their own language, without ever asking.

Unlike the IVR node for phone calls (which only knows the phone's country), this version understands every channel: WhatsApp, Webchat, Telegram, Messenger, Instagram, email and more.

Requirements

  • A workflow built in Workflows with an active trigger (for example Conversation created or Inbound message).
  • The contact needs at least one inbound message or a valid phone number for detection to work.

How detection works

With the Automatic (per-channel cascade) method the node picks the best signal per channel:

  • WhatsApp, SMS and voice: by the phone's country code (+593 → es, +55 → pt, +49 → de, +1 → en).
  • Webchat: by the visitor's browser language.
  • Telegram: by the Telegram account's language_code.
  • Messenger, Instagram, email and others: by the text of the contact's last message.

If you pick the Text only method, the node always classifies by the last message text. Turn on Use AI for more accurate text detection (it counts against your plan's AI credit); leaving it off uses a free keyword heuristic.

Steps to set it up

  1. Open Workflows and enter your workflow editor.
  2. Drag the Detect language node from the palette (Condition category) and connect it after your trigger.
  3. In the Configure panel choose the Method: Automatic (recommended) or Text only.
  4. Tick Use AI if you want higher accuracy on text detection.
  5. Under Supported languages check the ones you need (es, en, pt, fr, de, it…). Each one creates its own branch; an Other catch-all branch always exists too.
  6. Set the Default language for when nothing is detected.
  7. (Optional) Leave Save to variable as detected_language and enable Save to contact to reuse the value later.
  8. Wire each branch (es / en / pt / … / Other) to the next nodes: a message, an AI agent or a different assignment per language.

Verification

Save and activate the workflow. Send a test message from a number or browser in the expected language and open the workflow's execution history: you'll see the branch taken and the $detected_language variable with the ISO code (e.g. es). The node also exposes $detected_language_confidence and $detected_language_source.

If it doesn't work

  • Always falls to Other: the detected language isn't in Supported languages. Add it or review the default.
  • WhatsApp detects poorly: detection uses the phone's country code; an international number may not match the real language. Switch the method to Text only.
  • Weak text detection: enable Use AI for short or ambiguous text.

Tips

  • Place the node as early as possible so everything downstream inherits the language.
  • Save the language to the contact: the next conversation starts routed without detecting again.

Related articles

Was this helpful?

Related articles

Message us on WhatsApp