How to copy dynamic text from outlook and paste it in application

My query is as follows

  1. When I login to my application I will get security code (like OTP) to my email address which is a dynamic value
  2. I need to copy the security code from specific subject of the email
  3. Paste the code in the application login page

Example

Dear ABC,

Your one-time security code for the CX-app is: 6SMJRD.

I need to capture the dynamic value after the CX-app is: word in that line. Which is 6SMJRD

As of now I can able to get outlook email but don’t know how to copy the code from specific subject of the email and paste it in the application.

Hi,

You can use regular expression to get the code

(?<=CX-app(.+): )[\w\d]{6}

http://regexstorm.net/tester

Hi,

Refer the below workflow, just send a mail to yourself with the above Example message
and run this workflow.

Main (2) (1) (5).xaml (8.8 KB)

1 Like

Hi,

Thanks! :smiley: but unfortunately I got a challenge here is, after it copy the code I need to go back to the login window to paste the code which is already active in the browser. How to navigate back to the browser again?

if the screen where you have to provide the code is already open,Use Attach browser and use typeinto.

2 Likes

Thanks a lot Anil :smiley:

It works now as I expected. Bot opened the specified URL & entered username and password in the login page, then the security code has been copied from the outlook and pasted in the login page again.

Thanks,
Dinesh Kumar. M

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