🇪🇸 Español 🇬🇧 English 🇧🇷 Português

Node: Detect Language

How to use the Detect Language node to route a conversation based on the contact's language in a workflow.

Jul 11, 2026

The Detect Language node is a condition (router) that identifies the contact's language and sends the workflow down a different branch based on the result. It's the key piece for serving multilingual customers with a single workflow: instead of duplicating logic per language, this node decides the path and the rest of the flow is built once per language.

When to use it

  • At the start of a reception workflow, to route to Sales/Support in the right language.
  • When the channel (WhatsApp, Webchat, Telegram, Messenger) receives contacts from different countries or languages.
  • Before an AI Respond node so the right prompt or agent is used based on the detected language.

How it detects the language

  • Auto method (default): uses a per-channel cascade:
    • WhatsApp/SMS/VoIP → by the contact's phone country code.
    • Webchat → by the visitor's browser language.
    • Telegram → by the user's app language setting.
    • Messenger/Instagram/Email and others → by the text of the last inbound message.
  • Text method: ignores the channel and always classifies by the last inbound message's text.
  • Use AI (only applies to text analysis): turns on the AI engine instead of the free keyword heuristic; consumes the workspace's AI wallet/cap.

Configuration

  • Method: auto or text.
  • Use AI: yes/no (only relevant to text analysis).
  • Supported languages: list of languages that get their own branch (e.g. es, en, pt). Any detected language not in this list falls into the "other" branch.
  • Default language: used when nothing can be detected.
  • Save to variable: variable name where the detected language code becomes available for later steps.
  • Persist to contact: when enabled (on by default), stores the detected language on the contact's record for reuse by the voice AI and future automations.

Example

A WhatsApp reception workflow adds Detect Language with Supported languages = es, en, pt and Default language = en. A contact with a +55 (Brazil) number follows the "pt" branch to the Portuguese-speaking support agent; a contact with an unrecognized number falls into "other" and follows the generic English branch.

Tips

  • Always add a branch for "other" in addition to your supported languages: it's the catch-all for any unconfigured language.
  • The result is available as the $detected_language variable without needing to configure "Save to variable".

Troubleshooting

  • It always falls back to the default language: check that the contact has a valid phone (voice/WhatsApp channels) or that the last inbound message has text (text channels).
  • It's not saved on the contact's record: confirm "Persist to contact" is enabled; it also only persists when detection confidence exceeds the minimum threshold.
Was this helpful?

Related articles