cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MW630
Level: Powered On

Flow stuck on "Running" while reading Excel data from OneDrive

Hello,

 

I'm having an issue with a flow I'm trying to build.  It seems to work ~10 times in a row and then will get hung on "running" on step 5 below and never complete unless I cancel it or manually intervene.  The flow is doing the following:

 

 -  Monitoring e-mails with an attachment named "Confirmation Tracking.xlsx"

 -  Extracts the attachment and saves it to a OneDrive folder

 -  Loads the contents of the Excel document from OneDrive to a SharePoint List

 -  Moves the attachment from the original OneDrive folder to an archive folder and appends a date to the name

 

For testing, I'm using the exact same file with the exact same data each time. I send the same attachment to the monitored e-mail address.  When the flow hangs on "running", I can go into OneDrive and manually delete the Confirmation Tracking.xlsx file and re-upload, and then the flow will complete successfully.  I can't figure out why it's hanging occassionally on this, I've tried adding a Delay Until for 45 seconds between the file being written to OneDrive and the process of reading it to load to the SharePoint List.  

 

Any help would be much appreciated. 

 

Here are my flow steps:

 

Step 1: Setup the mailbox to be reviewed for attachments and initialize the variable for the Delay Until:
step1.jpg

 

Step 2: Look at the attachment to see if the name contains "Confirmation Tracking.xlsx":
step2.jpg

 

Step 3: If it meets that condition, it creates a file in a OneDrive folder named "Test_Extract"
step3.jpg

 

Step 4: Monitor when a new file is created in "Test_Extract" folder, Delay Unit for 45 seconds, Get Rows from "Confirmation Tracking.xlsx":

step4.jpg

 

Step 5: Add the items from "Confirmation Tracking.xlsx" to the SharePoint list:
step5.jpg

 

Final Steps: Move to archive and delete the file from the original folder:
step6.jpg

 

This works ~90% percent of the time, but the other 10% it just gets stuck on step 5 and will not finish "Running" unless I manually cancel the flow, manually delete and re-upload the file to the Test_Extract folder, or it runs for like 5 days and times out.

 

Any input would be much appreciated.

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Flow stuck on "Running" while reading Excel data from OneDrive

Hi @MW630,

 

Please take a try to move the "create file" action inside your Step 3 to the If yes branch of the Condition inside your Step 2.

 

Best regards,

Alice

MW630
Level: Powered On

Re: Flow stuck on "Running" while reading Excel data from OneDrive

Hello @v-yuazh-msft,

 

Will you please clarify?  I only want to move the attachment to OneDrive if it has "Confirmation Tracking" in the name of the file.   Where would I move the "Create File" to so it's out of the conditional statement?

 

Are you saying create the file either way, and then under the "No" condition, go in and delete it if it does not have "Confirmation Tracking" in the name?

 

Create File.jpg

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,969)