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

Flow hangs trying to read Excel Document on OneDrive

I'm trying to create a flow that accomplishes the following:

 

1) Users e-mail a .xlsx to a monitored e-mail address. They will use a template worksheet that has a data table so the table name will be consistent with every submission.

2) When a new e-mail arrives, if there is an attachment with "Confirmation" in the name, that attachment is copied to a OneDrive for Business Folder.

3) A "when a new file is created" trigger is monitoring for when the file is created in OneDrive and then Get Rows is used to read the file and enter the contents of that attachment to a SharePoint List.

4) After the data from the .xlsx is loaded to the SharePoint list, the file is duplicated in an archive folder and the original is deleted. 

 

The issue is the flow will work very randomly.  It keeps get hung on the "When a file is created" step. See the second screenshot below, I deleted the file after it was running for over 45 minutes to capture the error.  We're only dealing with 2 records in the spreadsheet - so not a ton of data.

 

What should I do to avoid the issue it's having getting stuck on "When A File Is Created"?

 

1) Flow layout:

Flow 1.jpg

 

2) Flow stuck on file creation - it shows an error on apply to each, but that happens when I deleted the file from OneDrive:

Flow 1.jpg

4 REPLIES 4
Community Support Team
Community Support Team

Re: Flow hangs trying to read Excel Document on OneDrive

Hi @MW630,

 

Thanks for giving the detailed scenario on your flow. According to your description, I have made the following flow for your reference.

 

Please just remove the trigger When a file is created from your flow. After the action Create file, add the action Create item directly.

 

As you mentioned that all the attachments have the same table name, do they have the same column names?

 

If yes, then in the action Create item, use the following functions to get items:

For Title: item()?['name']

For date: item()?['date']

 

The items will be created successfully in the SharePoint list.

1.PNG2.PNG

 

 

Please try it on your side and feel free post back if you need more help.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MW630
Level: Powered On

Re: Flow hangs trying to read Excel Document on OneDrive

@v-yamao-msft Thank you for the suggestions.  

 

I am receiving the following error when it tries to create the SharePoint List item.  Any suggestions?

 

  "status"400,
  "message""To add an item to a document library, use SPFileCollection.Add()\r\nclientRequestId: 26368ef2-88ac-4cdc-b392-a3ce59ecbbc6\r\nserviceRequestId: e02c899e-a097-6000-ee8a-3eaf83c71d38"

Community Support Team
Community Support Team

Re: Flow hangs trying to read Excel Document on OneDrive

Hi @MW630,

 

Could you share a screenshot of your current flow?

 

In the action Create item, are you trying to populate value into a library but not a list?

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Administrator
Administrator

Re: Flow hangs trying to read Excel Document on OneDrive

Hey, @MW630!

 

Thank you for posting on the Flow Community Forum! It appears as though @v-yamao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

 

Thank you for being an active member of the Flow Community!

 

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,096)