cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Riskyplan
Frequent Visitor

Delay needed to retrieve excel data ?

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Riskyplan
Frequent Visitor

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

View solution in original post

4 REPLIES 4
momlo
Impactful Individual
Impactful Individual

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
Super User
Super User

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
Impactful Individual
Impactful Individual

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...

Riskyplan
Frequent Visitor

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

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,413)