Power Automate Integration

MailSlurp integrates with Power Automate via REST API to provide email and SMS actions. Create and control real phone numbers and email accounts directly in your flows.

Get JSON to import

If you want a reusable custom connector, import the MailSlurp OpenAPI JSON definition.

You can either import directly from URL in Power Automate, or download JSON first:

bash
curl -L "https://api.mailslurp.com/v2/api-docs/" -o mailslurp-openapi.json

Then in Power Automate:

  1. Go to Custom connectors.
  2. Select New custom connector.
  3. Choose Import an OpenAPI file (or import from URL).
  4. Upload mailslurp-openapi.json or paste the OpenAPI URL.
  5. Configure API key auth using header name x-api-key.
  6. Save and test the connector actions.

HTTP Request integration

You can also call MailSlurp directly with built-in HTTP actions (without a custom connector):

  1. Add an HTTP action.
  2. Set method and URL for the MailSlurp endpoint.
  3. Add x-api-key in request headers.
  4. Use Parse JSON on the response body for typed outputs.

How to get JSON for Parse JSON

  1. Run the HTTP action once with sample input.
  2. Open the run history and copy the response body JSON.
  3. Add a Parse JSON action and choose Generate from sample.
  4. Paste the copied JSON.

Typical flow for OTP or email verification

  1. Create an inbox for the current run.
  2. Submit that email address to your app workflow.
  3. Wait for the latest matching email.
  4. Extract code or link content.
  5. Continue flow logic and assertions.

Important actions

Here are common actions for creating inboxes, waiting for messages, and extracting codes:

Create inboxes

Operation createInboxWithDefaults not found.

Wait for email

Operation waitForLatestEmail not found.

Extract content

Operation getEmailContentMatch not found.

Reliability tips

  • Create a fresh inbox per run to avoid cross-test message collisions.
  • Use bounded timeouts and branch on timeout/failure conditions.
  • Keep API keys in environment/connection secrets, not inline flow steps.
  • Add retries only for transient failures, not for invalid input errors.