Translator Localized SMS Notifications
A reusable, HTTP-callable flow that other flows call to send transactional SMS in the recipient's preferred language: it looks up the contact's language in Dataverse, translates the message with Microsoft Translator, sends it via Twilio, logs the send, and returns a JSON response. Lets appointment, delivery, and alert notifications reach customers in their own language.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
FlowLibs - Translator Localized SMS Notifications is a reusable, HTTP-callable cloud flow. Other flows or apps POST a recipient business key plus a message, and this flow looks up the recipient's preferred language in Dataverse, translates the message with Microsoft Translator V3, sends it via Twilio SMS, logs the send to a Dataverse audit table, and returns a JSON response to the caller.
Why it matters: A single-language SMS underperforms with international customers. Centralizing localization in one shared service means every appointment, delivery, or alert notification reaches each customer in their own language without each calling flow re-implementing translation logic.
Ships Off - going live requires only authorizing the three connections and setting environment-variable values.
Use Case
A business runs many notification flows (appointments, deliveries, OTPs, alerts). Rather than each flow handling translation and SMS itself, they call this one endpoint with a contact key and the English message. The service resolves the contact's language, translates, sends, and logs - returning sent (200) or contact_not_found (404) with a correlation id for tracing.
Flow Architecture
manual (HTTP Request)
RequestReceives contactKey, messageText, optional sourceLanguage
Initialize variables
Initialize Variable x3Correlation id (guid), source language (caller or default), fallback language
Get Contact Profiles
Dataverse ListRecordsLookup by flowlibs_contactkey, top 1
Resolve contact fields
Compose + Initialize VariableFirst match, phone, target language (contact's or fallback), name
Check Contact Found
IfBranch on whether a phone was found
Translate + Send + Log (found)
Translator Translate + Twilio SendMessage + Dataverse CreateRecordTranslates, sends the localized SMS, logs status Sent, responds HTTP 200
Log Not Found
Dataverse CreateRecord + ResponseLogs status ContactNotFound and responds HTTP 404
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TwilioFromNumber | String | +15551234567 | Verified Twilio sender number (shared across FlowLibs Twilio flows) |
| flowlibs_DefaultSourceLanguage | String | en | Source language when the caller doesn't supply one |
| flowlibs_FallbackLanguageCode | String | en | Target language when a contact has no preferred language on record |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Translator | shared_microsofttranslatorv | Translate |
| Twilio | shared_twilio | SendMessage |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Length guard
- Add a Condition that warns or splits when a translated message exceeds the SMS segment limit (translations often expand vs English).
- Glossary / brand terms
- Wrap protected terms or set Translator category to keep brand names untranslated.
- Channel fallback
- If a contact has no mobile number, branch to email instead of returning 404.
- Opt-out enforcement
- Check flowlibs_optstatus before sending and skip non-consented contacts.
- Production hardening
- Secure the trigger URL (it's an open HTTP endpoint) and consider rate limiting at the caller.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Source language
Caller value or default
EXPR.02Target language
Contact's language or fallback
EXPR.03Translated text
Reads the first translation result with fallback to source text
EXPR.04Contact found test (If)
True when a phone was matched
EXPR.05Twilio SID for log
Reads the Twilio message SID
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.