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

Flow to send excel as attachment does not fully populate attached excel doc.

(I posted a similar issue earlier on the 'general' forum, but figured it might be more relevant here. Apologies if this goes against posting rules, but I'm honestly not sure where else to look.)

 

Here's my flow (I can't find a way to post screenshots on this forum):

 

1) Flow triggered in powerapps. Email parsed to Flow. OK. 

 

2) Get items from: sharepoint list. OK. 

 

3) List rows present in: sharepoint excel doc. OK. 

 

4) Apply to each: excel row, add sharepoint rows to sharepoint excel doc. OK. (The excel table populates fine.)

 

5) Get file metadata: excel doc. OK.

 

6) Get file content: excel doc. OK. 

 

7) Get file metadata: excel doc. OK. 

 

8 ) Send email (v2) with excel doc as attachment: Attached Excel doc has several rows missing from sharepoint list.

 

 

Why might this be? I have tried delays of up to a minute and isolating individual steps, with no success.

 

I do note that when I removed steps 1-4, and pre-populated excel doc with the same info, it successfully sent all rows into the resulting excel attachment. So this leads me to believe that the 'get file content' task is being run before the excel doc has been fully populated...but adding a delay before the 'get file content' task, even of 30 seconds, and even for a small number of rows (eg 3) did not solve this!

 

Could the underlying cause be that the flow is attempting to run certain tasks in parallel, and if so, is there any way to prevent future tasks being run before present tasks are complete? I have tried initialising and evaluating variables to try to accomplish this without success-is there a better approach? 

 

It does not matter whether the list starts off with only, say, 5 rows, or 50; some rows are always missing. 

 

Any help would be much appreciated-thanks. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow to send excel as attachment does not fully populate attached excel doc.

Hi @MaxDonen ,

 


@MaxDonen wrote:

4) Apply to each: excel row, add sharepoint rows to sharepoint excel doc. OK. (The excel table populates fine.)


Why are you apply to each excel row to add sharepoint rows to the excel.

The apply to each for excel rows is not needed and you should apply to each sharepoint items to add the rows to excel table.

 

Also please add a delay for several minutes before the Get file content action.

 

Please take a try and let me know with the screenshot if your issue still exists.

 

Best regards,

Alice       

 

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

 

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Flow to send excel as attachment does not fully populate attached excel doc.

Hi @MaxDonen ,

 


@MaxDonen wrote:

4) Apply to each: excel row, add sharepoint rows to sharepoint excel doc. OK. (The excel table populates fine.)


Why are you apply to each excel row to add sharepoint rows to the excel.

The apply to each for excel rows is not needed and you should apply to each sharepoint items to add the rows to excel table.

 

Also please add a delay for several minutes before the Get file content action.

 

Please take a try and let me know with the screenshot if your issue still exists.

 

Best regards,

Alice       

 

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

 

View solution in original post

MaxDonen
Level: Powered On

Re: Flow to send excel as attachment does not fully populate attached excel doc.

Thanks for the reply. 



Why are you apply to each excel row to add sharepoint rows to the excel.

The apply to each for excel rows is not needed and you should apply to each sharepoint items to add the rows to excel table.

Apologies: I worded this part incorrectly. By 'apply to each' I meant to the sharepoint list, not to the excel doc. You were right to flag that point!

 

I have added a 2min delay to my flow before getting file content, and it seems to work fine now. 

 

I should add that if the original sharepoint list contains more than 100 rows, then default Flow settings ignore any additional rows. I fixed this by selecting 'settings' for the 'get items' (from sharepoint) part of my flow, and then setting the 'pagination'  to 'on', and the pagination limit to the maximum, 5000. 

 

This seems to have worked!

Highlighted
Community Support Team
Community Support Team

Re: Flow to send excel as attachment does not fully populate attached excel doc.

Hi @MaxDonen ,

 

Please feel free to ask here if you have any problems.

 

Best regards,

Alice       

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

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

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 Solution Authors
Top Kudoed Authors
Users online (4,450)