web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delay needed to retrie...
Power Automate
Answered

Delay needed to retrieve excel data ?

(0) ShareShare
ReportReport
Posted on by 39

Attempting to log on to a web page using MFA via retrieving a code from an email (cloud flow)  and filling it into a field )desktop flow).

Process listed below.

 

We can launch the chrome browser, and click on the link to send an email code.    A cloud flow is watching for the email, extracts the MFA code from the email and updates an excel file stored on OneDrive.    After a 30 sec delay the desktop flow proceeds ( we have tried increasing the delay up to 120 sec).    The behavior is that the desktop flow retrieves the previous data from excel,  not the updated (new data).    We have confirmed that that data is changed by the cloud flow within 30 seconds by opening the file and watching the data update in real time.    I have opened the excel file after desktop flow runs and retrieves the wrong data.   I observe a momentary flash of the old value, however within in split seconds the value updates to the new data.    Any thought on what is occurring?  

 

Riskyplan_0-1667482313925.png

 

I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    My initial thoughts:

     

    If you are using a service account that humans are not using - see if you can disable 2fa and use the API key, for example.

    If not possible - store excel in Sharepoint and use the new Sharepoint actions - this way, you are accessing the online file, so you are not dependent on OneDrive to sync the file to the local host.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Odd that the second "wait 10 seconds" didn't do it, assuming it's a refresh or something.

     

    I would add this error workflow:

     

    Before Launch Excel:

    Get Environment Variable %PreviousCode%

    Label: Retry

     

     

    After "read B2 from Excel" to %ExcelData%

    If %ExcelData% = %PreviousCode%

        Save and Close Excel

        Go To Label: Retry

    End (If)

    Set Environment Variable %PreviousCode% to %ExcelData%

     

    So, basically, each time we use this Excel spreadsheet with MFA, we know the previous code.  Note:  any other flows that use the same should be writing to the same environment variable and have the same validation process.  Another option would be to open the Excel BEFORE requesting the code and reading that to %PreviousCode%, closing it, and then running the flow as normal, so you don't have to rely on an environment variable.

     

    Best of luck!

     

     

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Maybe onedrive not syncing the file before the desktop flow opens it. 

    What came to my mind is that the file is not pulled to the desktop - @Riskyplan, did you mark it to be always available offline to be sure OneDrive always syncs the file from the cloud?

     

    https://support.microsoft.com/en-us/office/save-disk-space-with-onedrive-files-on-demand-for-windows-0e6860d3-d9f3-4971-b321-7092438fb38e

  • Verified answer
    Riskyplan Profile Picture
    39 on at

    What worked was to delete the step and it back using nest under a new Excel process.     I've not yet attempted to turn of the nest under parameter.  Therefore, I can't tell if was a removal/add routine that fixed it or both.    Its working. good enough for me.   Thanks for the suggestions

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 241 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 179

#3
Haque Profile Picture

Haque 159

Last 30 days Overall leaderboard