To send an SMS from Microsoft Power Automate, add an HTTP action that POSTs JSON to the SMS API with the API key in an X-API-Key header, build the body with expressions from your trigger, set the action's retry policy, and put a Scope with a "has failed" branch after it to catch errors. Create the Idempotency-Key in a separate Compose action so every retry reuses it.
We make Ready, so the example uses our REST API and only the request shape we document: POST /v1/messages with to, body and consent_attested, plus X-API-Key and Idempotency-Key. The HTTP action is a premium connector, so check that your Power Automate plan includes it.
The flow at a glance
| Step | Action | Purpose |
|---|---|---|
| 1 | Trigger | A new row, form response or approved request |
| 2 | Compose, named Key | guid(), created once per run |
| 3 | Scope, named Try | Holds the HTTP action |
| 4 | HTTP, named Send text | The API call |
| 5 | Scope, named Catch | Runs only if Try failed or timed out |
Step 1: make the key before the call
An expression written directly in a header is easy to get wrong when you think about retries. Compute the key once and refer to it:
- Add a Compose action named
Key. - Set its input to the expression
guid().
The HTTP action later reads outputs('Key'). A retry of the HTTP action sends the same inputs, so the same Idempotency-Key goes out, and a repeated key means the request isn't sent twice. If the same source item can start the flow twice (an "item modified" trigger often does), store the key on the item instead, such as in a column, and reuse it when it's there. Our idempotency guide explains why.
Step 2: configure the HTTP action
Add HTTP inside the Try scope and rename it Send text. Set:
| Field | Value |
|---|---|
| Method | POST |
| URI | https://api.tryready.com/v1/messages |
| Headers | Content-Type: application/json |
X-API-Key: your key, from a secret environment variable | |
Idempotency-Key: @{outputs('Key')} | |
| Body | See below |
Don't paste the key into the action. In a solution, create an environment variable of type Secret (backed by Azure Key Vault) and pick it from the dynamic content list. Then open the action's Settings and turn on Secure Inputs and Secure Outputs, so the key doesn't show in run history. See key security and rotation.
The body, with expressions from a trigger that has a Phone and an OrderId column:
{
"to": "@{triggerOutputs()?['body/Phone']}",
"body": "Your order #@{triggerOutputs()?['body/OrderId']} has shipped.",
"consent_attested": true
} to has to be E.164, such as +12125550199. A 10-digit US number is treated as +1, but cleaning the value first avoids surprises, and our E.164 guide covers it. Set consent_attested to true only when the recipient agreed to texts, for example because the flow runs off a form where they ticked the box.
Step 3: set the retry policy
Open Settings on the HTTP action and find Retry policy. The options are Default, None, Fixed interval and Exponential interval.
- Default retries up to four times with an exponential delay, for responses that signal a temporary problem such as 408, 429 and the 5xx range. This is fine for most flows.
- Exponential interval lets you set the count and a first interval, for example 4 retries starting at
PT20S. Use it if your trigger volume can hit the rate limit. See SMS API rate limits. - None is right when you handle retries yourself.
Because the retries reuse the Compose output, the key stays the same, which is what makes them safe. Retries on one action are short-term protection, not a queue, so keep the count small and let the error branch handle what's left.
Step 4: build the error branch
Retries cover temporary failures. A 4xx answer, such as a bad number or an opted-out contact, won't fix itself, and it marks Send text as failed. Catch it with the Scope pattern:
- Add a Scope named
CatchafterTry. - On
Catch, open Configure run after and tick has failed and has timed out. Untick is successful. - Inside
Catch, add a Condition with this expression on the left:
contains(string(outputs('Send_text')?['body']), 'QUIET_HOURS_BLOCK') If true, the 409 is a time rule, not a failure. Add a Delay until action set to the next morning, then run the send again, or write the item to a list for a later flow. See handling quiet hours.
If false, it's a real failure. Log it where someone will see it: post to a Teams channel, add a row to a SharePoint list, or email the owner. Use these expressions for the details:
outputs('Send_text')?['statusCode']
string(outputs('Send_text')?['body']) The action name Send text becomes Send_text in expressions, so use Send_text when you refer to it. If you rename the action, update the expressions, or the flow will save but fail when it runs.
Common mistakes
- Putting
guid()straight in the header. Compute it once in Compose, so you know exactly which value every retry uses. - Leaving Secure Inputs off. The key then appears in run history for anyone with access.
- Treating any 4xx as retryable. It won't fix itself, so branch and alert instead.
- Running on a trigger that fires twice. Store the key on the item, or add a condition that skips an item already marked sent.
For replies, read the webhook docs: build a separate flow with the "When an HTTP request is received" trigger, verify the signature, return 200 fast and dedupe. Our inbound webhook guide explains the handler.
FAQ
Do I need a premium license for the HTTP action?
Yes, HTTP is a premium connector, so the flow's owner needs a plan that includes it. Check your license before building.
Can I send to a list of people?
Use an Apply to each loop that sends one text per row, with its own key per iteration, or call the bulk endpoint described in the bulk messages docs. Keep the concurrency setting low if you hit rate limits.
How do I test without texting real people?
Run the flow against your own number first, with a test row. See the error codes docs for what each failure looks like.
The short version
Make the key once, put the HTTP call in a Try scope, let the retry policy handle the temporary failures, and send everything else to a Catch scope that someone watches. The messages API docs list every field, and you can create an account to get a key.