Skip to main content

UiPath integration

MailSlurp email and SMS APIs integrate with UiPath to provide powerful messaging and testing functionality. Create and control real email accounts and phone numbers from within your automations using low-code HTTP requests or our native C# library.

Please see our UiPath project on GitHub to get started.

Example testing flow

Say you want to test the user sign-up and verification process in a web application in UiPath. With MailSlurp we can create a test email account, submit it to the web application, receive and extract an OTP code, and confirm a new account. This can form the basis of our automated UiPath test of an application sign-up flow. You can see it in action in the video below:

How it works

uipath studio test setup

Setup in UiPath Studio

To test email and SMS in UiPath Studio create a workflow with a series of steps. These steps are comprised of HTTP Request actions to the MailSlurp API and Browser automation steps that use the email accounts and phone numbers within automations and tests. An example main.xaml would look like this:

Use email in UiPAth

You can combine MailSlurp API actions to create phone numbers and email accounts on demand then send and receive emails, attachments, and SMS within automations and RPA workflows. For more methods see the API endpoints

Important actions

Here are some common actions for creating inboxes, reading emails, and extracting codes. Use the UiPath Studio HTTP Request actions to invoke these MailSlurp endpoints. Make sure you set an x-api-key header with the value of your MailSlurp API Key.

Set header

Create inboxes

To create a new email address use the operation below:

Operation createInboxWithDefaults not found.

To save the inbox id and emailAddress for use in further steps use the UiPath Regex extract action to pluck these values from the JSON response.

Regex extract variables

Wait for email

To wait for emails in your tests use the waitForLatestEmail MailSlurp endpoints.

Operation waitForLatestEmail not found.

In UiPath Studio this request looks like this:

Http request

Extract content

Operation getEmailContentMatch not found.