Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

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

(0) ShareShare
ReportReport
Posted on by 31

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

  • PaulineTCL Profile Picture
    31 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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

     

  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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,

     

  • PaulineTCL Profile Picture
    31 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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

     

  • Rhiassuring Profile Picture
    8,688 Super User 2025 Season 1 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    Close!  Filter Query:   FileLeafRef eq 'FileNameDynamicContent'

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

  • PaulineTCL Profile Picture
    31 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    Hi

    Is it like this:

    PaulineTCL_0-1659947780763.png

     

     

  • Rhiassuring Profile Picture
    8,688 Super User 2025 Season 1 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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.

  • PaulineTCL Profile Picture
    31 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    Hi

     

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

    PaulineTCL_0-1659945165893.png

     

  • Rhiassuring Profile Picture
    8,688 Super User 2025 Season 1 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    Thank you!

     

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

  • PaulineTCL Profile Picture
    31 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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 Profile Picture
    8,688 Super User 2025 Season 1 on at
    Re: Submit a file but became duplicate or more in SharePoint Documents folder

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow