Skip to main content

Resolve email OTP in AI runs

Last updated: September 2026

This document explains how to register a MailSlurp inbox in Katalon True Platform so Run with AI can retrieve a one-time passcode (OTP) during a login step.

Overview​

When an application emails a verification code during login, the code is not available until the run requests it. Registering a MailSlurp inbox lets you write a step such as "Enter the OTP from payroll inbox." and have the runner retrieve the latest code during the run.

The code is read at run time and typed into the application. It is redacted from test data, results, logs, run history, and API or MCP responses.

The setup has two parts: register the inbox as a secret, then name it in the test step.

Requirements
  • A MailSlurp account, with an inbox and its API key. Katalon does not host or provision the mailbox.
  • Permission to manage Secrets & Variables on the project.
  • A cloud-hosted execution environment. Secrets are not supported on self-hosted environments.

Set up email OTP handling​

The inbox is stored as a secret, alongside the project's other secrets and variables.

  1. Go to Settings > Configurations > SECRETS & VARIABLES.
  2. Select Add secret / variable.
  3. Leave Type set to Secret, then select MailSlurp Inbox as the secret type.
  4. Enter the inbox details and select Add MailSlurp inbox.
    • Inbox name: The name you will use in test steps, for example payroll. Choose something you can write naturally in a sentence.
    • Inbox UUID: The MailSlurp inbox identifier, in the form 00000000-0000-0000-0000-000000000000
    • API key: Your MailSlurp API key. It is write-only. Once saved it is never rendered back in the UI, an API response, or an MCP response.
    • Email address: The inbox's address, for example payroll@example.mailslurp.com

Secrets are saved at the project level.

Refer to this interactive walkthrough to see the complete setup:

Name the inbox in the test step​

  1. In your test step, refer to the inbox by the exact Inbox name you registered. For example:

    Enter the OTP from payroll inbox into the verification code field.

  2. Run the test with Run with AI. The runner retrieves a new code when it reaches the step.

Only messages that arrive after the step begins are eligible. A code left over from an earlier run cannot satisfy the step.

The step must name a configured inbox

If a step asks for a verification code without naming a registered inbox, it will not work. The runner may type a placeholder value, and the step may appear to pass. Always use the inbox name exactly as registered.

Renaming or replacing an inbox breaks steps that use its old name. Update those steps when you make the change.

In the run report, the OTP step's actual result is shown as --. This is expected: the code is redacted.

Concurrency​

Two runs sharing one inbox can consume each other's codes, because each run takes the newest matching message. Give concurrent runs distinct inboxes and distinct test data, or serialize them.

What is not supported​

Not supportedUse instead
SMS or phone-delivered codesNo alternative
TOTP or authenticator-app codesNo alternative
A Katalon-hosted or Katalon-provisioned inboxBring your own MailSlurp inbox
Account-level or cross-project inbox configurationRegister the inbox per project
CAPTCHA and other human-verification challengesNo alternative

Troubleshooting​

SymptomCause and fix
The runner types a placeholder such as 00000 or 123456The step did not resolve to a registered inbox. Check that the step names the inbox exactly as it appears in Secrets & Variables.
The step fails after waitingNo eligible message arrived while the step was running. Confirm the application actually sent to the registered address, and that the inbox is the one the application targets.
The step worked yesterday and fails nowThe inbox was renamed or replaced. Steps bind by name, so update every step that referenced the old name.
Codes are intermittently wrong under loadConcurrent runs are sharing one inbox. Give each run its own inbox, or serialize the runs.
Was this page helpful?