web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Handle Conditio...
Power Automate
Answered

How to Handle Conditional File Uploads with SharePoint DocLib

(0) ShareShare
ReportReport
Posted on by 517

Hello,

I have 2 flows. The first just checks if a file already exists in a SP DocLib.
The second flow adds the file using the attachment control from Power Apps.
The user clicks a button, the first flow is triggered and checks the file in DocLib. If no, the second flow should be triggered and attach the file in DocLib. If YES, a popup should appear asking the user if he wants to rewrite the file (because we can't add a file with the same name in the SharePoint DocLib -- well!).
With one file it's not a big problem BUT with 2 or more I don't know how to make it possible...
Is there a proper way to achieve this or maybe do it all in one flow and still allow users to agree/disagree to upload a file or not?

 

Sorry for this long message.
Any ideas?

dKayt

Categories:
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @dkayt 

    Can you incorporate a checkbox in the Power Apps form to ask users if they want to overwrite existing file(s). This eliminates the need for back-and-forth communication and simplifies the workflow.

     

     

  • dkayt Profile Picture
    517 on at

    Thanks @SudeepGhatakNZ  for replying.

    I will come back to you as soon as I try this out.

  • dkayt Profile Picture
    517 on at

    Hey @SudeepGhatakNZ , thanks again.
    I use a gallery and I collect all the files that the user should/can overwrite. In the gallery, I add a button to each file that needs to be overwritten. Seems to work 😉

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard