How to get OTP from outlook email


I’m still new to automation, can you help me?

How can I read the email and get the verification code?

What activities will you use for this process?


Hi @Nada_Ismail ,
We have activity get outlook mail body
you can use it


1 Like

Hi @Nada_Ismail

Welcome to Community!!
Use Get Outlook Mail Message activity in that use For each activity to iterate mails in that use

Then by using regex to get OTP

1 Like

Hello @Nada_Ismail

  1. Use the “Get IMAP Mail Messages” or “Get Outlook Mail Messages” activity to retrieve emails.
  2. Filter emails to select relevant ones.
  3. Use a loop to iterate through emails.
  4. Extract the verification code using activities like “Get Text” or “Regex.”
  5. Store the code in a variable for further use in your automation.

Thanks & Cheers!!!

How do I do the filtering part?


  1. Use the “Filter” property in the email activity.
  2. Specify filter criteria like subject, sender, date, or combinations.
  3. Use logical operators (AND, OR) as needed.
  4. Test and adjust the filter to select the desired emails.
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.