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

Submit a file but became duplicate or more in SharePoint Documents folder

Hi

 

I have workflow where staff can submit the file by drag and drop in a Document folder in SharePoint, in this case SP-Staff.

 

This will trigger a workflow where the file will be copied to another Document folder in another SP site, SP-Admin. At the same time, an email will be sent out to the staff that the file has been received by Admin.

 

However, sometime, the file dropped by the staff became duplicate or more, sometime up to 4, 5 duplicates. And, emails will be sent out few times also. This mostly happened when the staff drag and drop few files together.

 

I would like to know why did this happen? And, how to solve this issue?

 

Thanks

Pauline

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @PaulineTCL ,

 

Have you solved this issue? If not yet, please try and use another output from the trigger for the filter query:

vjefferni_0-1660639988030.png

vjefferni_1-1660640000398.png

 

Best regards,

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

10 REPLIES 10
Rhiassuring
Super User
Super User

Are you able to s how us the configuration of your flow? My guess is that you've got an Apply To Each that's duplicating, but of course I'd need to see it to tell you.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



PaulineTCL
Frequent Visitor

Hi

Following is my flow:

 

PaulineTCL_0-1659942853479.png

PaulineTCL_1-1659942921143.png

PaulineTCL_2-1659942971077.png

PaulineTCL_4-1659943192900.png

Flow ends after the 'Delete File'.

 

 

 

 

Rhiassuring
Super User
Super User

Thank you!

 

Do you have any Filter Query on your "Get Files (properties only)"?

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



PaulineTCL
Frequent Visitor

Hi

 

This is my Get Files (properties only).  'Filter Query' I didn't put any entry.

PaulineTCL_0-1659945165893.png

 

Rhiassuring
Super User
Super User

Okay. 

So, if your staff drag & drop multiple files, when it hits the "Get Items", it is going to find every file that came at the same time - not just the one. Your trigger is "When a file is created", so it would trigger for each any every one of these.

 

The solution: use Filter Query to filter on the filename in your Get Files (Properties Only). Then it will only pick up the one file it has triggered on.

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



PaulineTCL
Frequent Visitor

Hi

Is it like this:

PaulineTCL_0-1659947780763.png

 

 

Rhiassuring
Super User
Super User

Close!  Filter Query:   FileLeafRef eq 'FileNameDynamicContent'

(Where FileNameDynamicContent is the same as what you have in y our screenshot)

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



PaulineTCL
Frequent Visitor

Hi

There was error after I added the Filter Query and tested it.

 

PaulineTCL_0-1660009943949.png

PaulineTCL_1-1660010001094.png

I tested by dragging 3 files together and none of the files passed the flow at 'Get Properties'.  Tried also just dragged 1 file (other file), same error. 

 

I will copy the flow and do the test again later, as I need to ensure office operations not interrupted for now.

 

Thanks

 

Hi @PaulineTCL ,

 

Have you solved this issue? If not yet, please try and use another output from the trigger for the filter query:

vjefferni_0-1660639988030.png

vjefferni_1-1660640000398.png

 

Best regards,

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

PaulineTCL
Frequent Visitor

Hi Jeffer Ni

 

Sorry for trying out after 2 months of your reply.  

May I know, for the 'When a file is created' [the one I used in my flow], do I need to change to 'When a file is created in a folder' as you have shown in your reply above?
I couldn't get the 'x-ms-file-name-encoded' from the 'Add dynamic content'.  I can only see the few options as shown below.

Last 2 weeks, only ONE of my staff having problems where 2 files which he uploaded once in mid of September, these 2 files 'auto-uploaded' itself few times in a day and after 1-2 days, again it 'auto-uploaded'.  Not sure what happened.  And, only those 2 files. 

PaulineTCL_0-1665730641506.png

 

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,617)