Skip to content

Automation

Validate phone numbers and emails in Power Automate

Check emails and phone numbers in a Power Automate cloud flow with the premium HTTP action, Parse JSON and a Condition, with secure inputs to hide the key.

Updated 2026-11-26

This recipe checks the email of each new Microsoft Forms response, or each new SharePoint list item, in a Power Automate cloud flow. The HTTP action calls the API, Parse JSON turns the answer into fields, and a Condition decides what happens next. There is no native Qelka connector for Power Automate: the HTTP action reaches every endpoint with one Authorization header.

What you need

  • Power Automate with a license that includes premium connectors, such as Power Automate Premium or a Process license on the flow. HTTP is a premium connector, as far as we know: check your plan before you build.
  • A Qelka API key. A sk_test_ key returns simulated results and never spends credits: see Test mode.
  • A Microsoft Forms form with an email question (the Forms connector works with organizational accounts), or a SharePoint list with an Email column. For SharePoint, add a single line of text column EmailStatus to receive the result.

The key sits in the flow, readable by anyone who can edit it. Create a key for this flow only and restrict it to /email and /phone in the dashboard. See Restricted keys.

Steps

1. Create the flow and its trigger

Create an automated cloud flow. For a form, pick the Microsoft Forms trigger When a new response is submitted and select your form, then add the Microsoft Forms action Get response details with the same form and the response ID from the trigger. That action exposes each answer as dynamic content.

For a SharePoint list, pick the SharePoint trigger When an item is created and select your site and list instead.

2. Add the HTTP action

Add the HTTP action and rename it Verify email, so expressions can refer to it by that name. Fill it like this:

Field Value
Method POST
URI https://api.qelka.com/v1/email
Headers Authorization: Bearer followed by your key. Content-Type: application/json
Body {"email": "[the email answer]", "mode": "fast"}

Type the body by hand and insert the email answer from Get response details, or the Email column of the SharePoint item, from the dynamic content list where the placeholder is. Keep the double quotes around it.

mode: "fast" runs the syntax, DNS, disposable and role checks without the mailbox check, so the call does not wait for the recipient's mail server. When the other checks pass, it answers unknown with the reason smtp_not_checked. Use "mode": "full" when you need to know that the mailbox exists: it can answer deliverable and takes longer. See the email reference.

3. Secure the action

Open the action's menu (…), select Settings, and turn on Secure Inputs and Secure Outputs. The action shows a lock icon. Run history then hides the request, including the Authorization header, and the response, which holds the person's address.

Leave the retry policy, in the same Settings pane, on its default. Microsoft describes it as an exponential interval policy whose number of retries depends on the flow's performance profile, and the engine behind it resends requests that time out or get a 429 or 5xx answer; those are Microsoft's rules and may change. Our 429 rate_limited, 500 and 502 are exactly the errors worth retrying, and a 4xx such as 401 or 402 is not resent.

For a stronger setup, store the key as an environment variable of type Secret, backed by Azure Key Vault, inside a solution. Microsoft's documentation shows how to read it in a flow with the Dataverse action Perform an unbound action and RetrieveEnvironmentVariableSecretValue, with Secure Outputs on that action too.

4. Parse the answer

Add the Parse JSON action. Set Content to the Body of Verify email, and paste this schema:

json
{
  "type": "object",
  "properties": {
    "status": { "type": "string" },
    "reason": { "type": "string" },
    "did_you_mean": { "type": ["string", "null"] },
    "score": { "type": "integer" }
  },
  "required": ["status"]
}

did_you_mean is null when there is no suggestion, so its type allows both. Do not generate the schema from a single sample: a sample with a suggestion would make the field a plain string, and every answer without one would fail validation. The real answer has more fields, such as checks and domain, which this schema simply does not require.

5. Branch with a Condition

Add a Condition: status from Parse JSON, is equal to, undeliverable.

  • True: mark the record and tell someone. For SharePoint, use Update item to set EmailStatus to undeliverable. For a form, send yourself or the owner an email that includes did_you_mean when it is not empty, since the person may have mistyped a common domain.
  • False: continue the normal flow, and write status to EmailStatus for the record.

For finer routing, use a Switch on status instead:

status Meaning Suggested action
undeliverable Bad syntax, no such domain, or no mailbox Mark as bad, offer did_you_mean
risky Disposable inbox, catch-all domain or full mailbox Send to a review list
deliverable The mail server accepted the mailbox (full mode only) Continue
unknown Not conclusive, or smtp_not_checked in fast mode Continue, confirm by email

An unknown email is not a bad email: do not delete it. The email reference lists every reason.

6. Mark failed calls as unchecked

A failed call should not leave the record untouched. Add a parallel branch after Verify email with one action, for example SharePoint Update item with EmailStatus set to unchecked. Open that action's Settings, find Run after, select Has failed and Has timed out for Verify email, then clear Is successful.

To keep the reason, add a Compose action in that branch with this expression:

concat(coalesce(body('Verify_email')?['error']?['type'], 'no_response'), ' ', coalesce(outputs('Verify_email')?['headers']?['X-Request-Id'], ''))

It gives the documented error type, such as insufficient_credits, and the request id that support needs. The run history still shows the failed HTTP action, which is what you want when you investigate. Secure Outputs hides the values in the history, but the expression can still read them.

Phone numbers

Duplicate the HTTP action as Verify phone. Use the URI https://api.qelka.com/v1/phone and the body {"phone": "[the phone answer]", "country": "US"}, with the country from a question or column if you collect one: it tells the API how to read a number written without a +. Parse it with this schema:

json
{
  "type": "object",
  "properties": {
    "status": { "type": "string" },
    "e164": { "type": ["string", "null"] },
    "line_type": { "type": "string" }
  },
  "required": ["status"]
}

valid means store e164, the international format every system reads. invalid means ask for a correction. unknown means the number had no + and no country. Before you send SMS, read line_type: a landline usually cannot receive them. See the phone reference.

Handle errors and rate limits

No error is billed. 401 invalid_api_key and 403 forbidden mean a wrong or restricted key, 402 insufficient_credits an empty balance: the retry policy leaves them alone, the failure branch marks the record unchecked, and the Compose output tells you which one it was. Filter your list on unchecked regularly, fix the cause, and check those records again. See Errors.

A Forms trigger runs once per response, so the rate limit rarely matters there. It does when a flow loops over an existing list with Apply to each: a key allows 200 requests per 10 seconds. Keep the loop sequential and add a short Delay, or send up to 100 values in one call to https://api.qelka.com/v1/batch, which counts as one request. See Rate limits and the batch reference.

Each email check costs 1 credit and each basic phone check 1. Skip records that already have a status. For a whole list, export it and run a bulk file check instead.

Frequently asked questions

Do I need a premium license for the HTTP action?
As far as we know, yes: HTTP is a premium connector, and the Power Automate Free license covers standard connectors only. Microsoft's licensing FAQ says an automated flow that uses a premium connector needs a Premium license for its owner, an instant flow needs one for every user who runs it, and a Process license can cover the flow instead. Check yours in Power Automate under Settings, View my licenses.
How do I keep the API key out of the run history?
Turn on Secure Inputs in the HTTP action's settings: its inputs, including the Authorization header, are then hidden in run history. Turn on Secure Outputs too, since the response holds the person's email or phone. People who can edit the flow can still read the header in the designer, so use a restricted key, or a secret environment variable backed by Azure Key Vault if your flows live in a solution.
Why does the flow fail on some responses?
A bad email is not a failure: it is a normal answer with HTTP status 200 and the status undeliverable. The HTTP action fails only when the API answers with an error, such as 401 for a wrong key or 402 for an empty balance, or when it times out. The recipe adds a branch that runs after the HTTP action has failed or timed out, so the item is marked unchecked instead of left untouched.

More in Automation

All integrations

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time