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.
- OpenAPI JSON URL: https://api.mailslurp.com/v2/api-docs/
- Docs-hosted Swagger JSON: https://docs.mailslurp.com/apiDefinition.swagger.json
You can either import directly from URL in Power Automate, or download JSON first:
curl -L "https://api.mailslurp.com/v2/api-docs/" -o mailslurp-openapi.jsonThen in Power Automate:
- Go to Custom connectors.
- Select New custom connector.
- Choose Import an OpenAPI file (or import from URL).
- Upload
mailslurp-openapi.jsonor paste the OpenAPI URL. - Configure API key auth using header name
x-api-key. - Save and test the connector actions.
HTTP Request integration
You can also call MailSlurp directly with built-in HTTP actions (without a custom connector):
- Add an HTTP action.
- Set method and URL for the MailSlurp endpoint.
- Add
x-api-keyin request headers. - Use Parse JSON on the response body for typed outputs.
How to get JSON for Parse JSON
- Run the HTTP action once with sample input.
- Open the run history and copy the response
bodyJSON. - Add a Parse JSON action and choose Generate from sample.
- Paste the copied JSON.
Typical flow for OTP or email verification
- Create an inbox for the current run.
- Submit that email address to your app workflow.
- Wait for the latest matching email.
- Extract code or link content.
- 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.