Need To Extract Auth Token from Email and then Enter it into Application

I get an email with an authentication token in the body, it’s formatted like this:

Here’s your one-time verification token: 123456

I think I have to use the Get Outlook Mail Message and save the token as a variable. I figured out how to save the entire body as a variable, but not sure how to only extract the token.

Would I need to export the body into an Excel document and then scrape the key from there?

Hi @nick.r

You can extract body details as string and can use regex method or string manipulation to extract the authorization token.

You can try spilting the body text with delimiter as ‘:’

Thanks, I will try that. I also found another post with the same issue and will try that too.

1 Like

Hello,

If your are not familiar with Regex syntax or string manipulation, you can directly use UiPath inbuilt activity Matches and SplitString

Thanks…

Hey

As per @NIVED_NAMBIAR’s post string Manipulation or Regex will get the job done.

Regex pattern of “\d+” will work.

Check out my Regex MegaPost if you want to learn Regex :slight_smile: