Twilio Emergency Mass Notification
When an Emergency Alert row is created in Dataverse, the flow reads a recipient roster from SharePoint and broadcasts an SMS alert via Twilio with automatic retry, writes a per-recipient delivery log, marks the alert complete, and posts a live delivery summary to a Teams crisis channel. Reaches people fast when email and apps are too slow.
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
This solution broadcasts an emergency SMS alert via Twilio when an Emergency Alert row is created in Dataverse. It reads a recipient roster from a SharePoint list, sends each person an SMS (with automatic retry), writes a per-recipient delivery log row to Dataverse, marks the alert complete, and posts a live delivery summary to a Teams crisis channel.
Why it matters: In a crisis, email and app notifications are too slow or go unread. Mass SMS reaches people immediately, and the Dataverse delivery log gives an auditable record of who was contacted.
Built API-first. Ships Off - going live requires only connection authorization and env-var configuration.
Use Case
IT Admins / Executives need a reliable, trackable way to alert staff fast during incidents (outage, weather, safety event). Raising an alert is as simple as creating one Dataverse row; the flow handles roster lookup, throttled SMS broadcast, delivery logging, and a crisis-channel summary.
Flow Architecture
When an Emergency Alert is created
Dataverse SubscribeWebhookTrigger (Create, Organization scope)Fires when a new flowlibs_emergencyalert row is created; delivers the full row inline
Initialize variables
Initialize Variable x7Correlation id, sent/failed counters, alert title/message, severity, and the composed SMS body
Get Recipient Roster
SharePoint GetItemsReads active recipients (name + phone) from the roster list
Apply to each Recipient
Foreach (concurrency 1)Iterates the roster sequentially
Send Emergency SMS
Twilio SendMessage (retry 2x/15s)Sends the SMS to this recipient
Log SMS Delivery
Dataverse CreateRecordOne audit row: name, phone, Twilio SID + status, correlation id; increments the sent count
Update Alert Status
Dataverse UpdateRecordMarks the alert row Broadcast Complete
Post Crisis Summary to Teams
Teams PostMessageToConversationPosts alert, severity, count sent, and correlation id to the crisis channel
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TwilioFromNumber | String | +15551234567 | Twilio sender number (or Messaging Service SID for high volume) |
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Roster SharePoint site URL |
| flowlibs_EmergencyRosterListName | String | Emergency Recipients | Roster list name/GUID |
| flowlibs_TeamsGroupId | String | <your-team-id> | Crisis Teams team (group) id |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Crisis Teams channel id |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger CreateRecord UpdateRecord |
| SharePoint | shared_sharepointonline | GetItems |
| Twilio | shared_twilio | SendMessage |
| Microsoft Teams | shared_teams |
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.
- Geo / role targeting
- Extend the SharePoint $filter (or roster columns) to scope alerts by location or role.
- Batch throttling
- Add an env var for batch size and a Do until to chunk very large rosters within carrier rate limits.
- Two-way confirmation
- Add a Twilio inbound Request webhook to collect SAFE/HELP replies for headcount.
- Multi-channel fallback
- Branch to Outlook email or a voice call for numbers that fail delivery.
- Delivery callbacks
- Configure Twilio status-callback URLs to a companion flow that updates each delivery-log row's Delivery Status.
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.01Correlation id
Row value or a new guid
EXPR.02SMS body
Severity-prefixed broadcast body
EXPR.03Recipient phone (tolerant of column names)
Reads the phone from any of the common roster columns
EXPR.04Alert row primary key
Used to mark the alert complete
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.