Outlook Get emails -How to read dynamic number from emails

How to read the dynamic number from the body of outlook emails.

Process:
Every time form is submitted from one application we will receive an email in outlook with dynamic numbers (verification id), we need to give the verification id in next form to complete the process. My question is how to read the dynamic verification code from outlook email.

At present my bot read the mail body. But don’t know how to read the number alone. Please help. Thanks!

you need to use regular expressions and string manipulations to fetch only the required number from the whole message.

1 Like

@Jegadiswaran

It can be done using Regular expression as @Vinutha said.
We can help you if you can provide the sample mail body from which you need to fetch the verification Id.

Regards,
Suman

Hi Vinutha/Suman7, Right now I assigned entire mail body to “bodymassage”. I need to fetch only verification code which dynamically changes every time form submit happen.

Sample attached
uipathsample

Hi,
This works.
System.Text.RegularExpressions.Regex.Match(Input,“[0-9]{6}”).toString

Give the mailbody as the Input.

2 Likes

Please mark it as solved if you are satisfied by the solution

Thanks Rahul. Its working

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