cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrewValenzuel
Advocate II
Advocate II

Email notification from SharePoint attached the wrong PDF document to the email.

I have a trigger setup to email me a copy of a PDF when it is added to a SharePoint site.  This time two documents were submitted a few seconds apart.  I got two emails with the same document attached.  I verified in the site that the two documents are different, different names, different text.   

 

Anyone have any idea what happened?  

 

The trigger for the flow is SharePoint:  When a document is created in a folder.

 

The next step is SharePoint:  Get Document (Properties Only)

This step, I think, is the source of the problem.  The settings for this step are:   

AndrewValenzuel_0-1621285913214.png

The Top Count is set to 1.  And since it the docs were uploaded a few seconds apart...

 

Any suggestions for correcting this problem?  

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @AndrewValenzuel 

 

Thank you for posting.

 

According to your description, you are encountering receiving duplicate files issue.

 

Actually, the issue is caused by upload order in SharePoint. Even though you upload two files together, the order is depending on SharePoint upload mechanism. It doesn’t mean the last updated file will be counted as first. So the top count configuration is meaningless.

 

Meanwhile, the action you used is not such suitable. The ‘get files (properties only)’ is normal used after ‘get files’ and will cause looping for each file. So to avoid order issue to get duplicate file, we’d better change ‘get files (properties only)’ to ‘get file property’ if this action is necessary.

 

But in your scenario, we can change flow as below:

v-duann-msft_0-1621303112551.png

 

Once tested, I’m able to get separate emails with different files attached.

v-duann-msft_1-1621303112553.png

 

v-duann-msft_2-1621303112555.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

1 REPLY 1
v-duann-msft
Community Support
Community Support

Hi @AndrewValenzuel 

 

Thank you for posting.

 

According to your description, you are encountering receiving duplicate files issue.

 

Actually, the issue is caused by upload order in SharePoint. Even though you upload two files together, the order is depending on SharePoint upload mechanism. It doesn’t mean the last updated file will be counted as first. So the top count configuration is meaningless.

 

Meanwhile, the action you used is not such suitable. The ‘get files (properties only)’ is normal used after ‘get files’ and will cause looping for each file. So to avoid order issue to get duplicate file, we’d better change ‘get files (properties only)’ to ‘get file property’ if this action is necessary.

 

But in your scenario, we can change flow as below:

v-duann-msft_0-1621303112551.png

 

Once tested, I’m able to get separate emails with different files attached.

v-duann-msft_1-1621303112553.png

 

v-duann-msft_2-1621303112555.png

 

Hope the content above may help you.

 

Best regards,

Anna

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,408)