Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Unanswered

Automate Login to website with OTP

Like (0) ShareShare
ReportReport
Posted on 3 May 2023 03:06:17 by 53

Hi, I am currently working on a project where I need to login to a customer portal and download the report. The flow goes like this:

1. Access Portal

2. Login via email

3. Receive OTP via email (based on login email)

4. Input OTP on portal 

5. Download Reports

 

My current problem is I don't know how to get the OTP sent to email and input it in the portal to be able to login. Any idea how can I do it? Thank you

  • julian1994acuna Profile Picture
    53 on 09 May 2023 at 09:08:14
    Re: Automate Login to website with OTP

    Just an update, I am able to select specific value on the variable by using these:

    "To retrieve a specific item of a datatable, use the following notation: %VariableName[RowNumber][ColumnNumber]%. Keep in mind that the RowNumber and the ColumnNumber should be 0 for the first item (row or column)."

  • julian1994acuna Profile Picture
    53 on 09 May 2023 at 07:32:41
    Re: Automate Login to website with OTP

    Hello,

     

    I'm very new to Power Automate so I apologize in advance if I don't understand some of it.

     

    I am able to retrieve the email. Now the problem is how can I extract the OTP code only? In my current flow, I am able to extract the OTP code only. But the issue is when I call the variable stored with the OTP value, I get 2 OTP Codes instead. How can I select only 1 value?

     

    Variable:

    julian1994acuna_1-1683617466697.png

     

    My Flow:

    julian1994acuna_0-1683617400731.png

     

    Thanks and Regards,

    Julian

     

  • julian1994acuna Profile Picture
    53 on 09 May 2023 at 07:32:02
    Re: Automate Login to website with OTP

    Hello,

     

    I'm very new to Power Automate so I apologize in advance if I don't understand some of it.

     

    I am able to retrieve the email. Now the problem is how can I extract the OTP code only? In my current flow, I am able to extract the OTP code only. But the issue is when I call the variable stored with the OTP value, I get 2 OTP Codes instead. How can I select only 1 value?

     

    Variable:

    julian1994acuna_1-1683617466697.png

     

    My Flow:

    julian1994acuna_0-1683617400731.png

     

    Thanks and Regards,

    Julian

     

  • Nived_Nambiar Profile Picture
    17,538 Super User 2025 Season 1 on 07 May 2023 at 05:11:51
    Re: Automate Login to website with OTP

    Hi @julian1994acuna 

     

    What you can do is 

     

    1. Launch the browser to open the website

     

    2. Then make the bot to log in the website

     

    3. Then make the flow to wait for the email regarding OTP to appear in mailbox (as general it may take time)

     

    4. Retrieve the email data and then input OTP details

     

    5. Download the reports 

     

    Refer this

     

    Nived_Nambiar_0-1683436304744.png

     

     

    Hope it helps !

     

  • Jdelavega Profile Picture
    106 on 05 May 2023 at 21:43:33
    Re: Automate Login to website with OTP

    Hi @julian1994acuna 

     

    I think you can use the Outlook action to retrieve the email and its attachment. Have you tried this?"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,771 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard