Use case

Waiting for an OTP in an AI agent workflow

Agents lose time and tokens polling inboxes. A wait step replaces the loop with a single call that returns the code as soon as it lands.

What it does

The wait step blocks until an email with a verification code or link arrives at the address, then returns only the extracted code or link plus a small summary of the message. It never returns the whole email body.

Useful options

  • Filter by sender, so only mail from the service you are signing up to counts.
  • Filter by subject text.
  • Ignore mail already in the inbox, which is useful on retries.
  • Ask for a code, a link, or either.

If it times out

A timeout is a normal result, not an error. The response includes a hint, and the agent can wait again and ignore older mail so a stale code is not returned.

Frequently asked questions

How long can it wait?

Up to 25 seconds per call, or up to 110 seconds in clients that support progress notifications.

Does it return the email body?

No. It returns the extracted code or link only, which keeps untrusted text out of the model.

Related use cases

Read next