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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Mirrored Delete from b...
Power Automate
Unanswered

Mirrored Delete from between Sharepoint Document Libraries

(0) ShareShare
ReportReport
Posted on by

I am trying to control a document library's files from a separate document library in the same sharepoint site.

 

I already have a successful flow for copying the file over to the library I want.

 

I've had some success updating the copied file in the destination library when modifications are made to the original file in the source library.

 

The only thing I have had no success on is deleting the copied file in the destination library when the orginial file in the source library is deleted.

 

I believe I need to figure out how to identify the copied file, but I can't grab it by the unique file name with extension or anything else I've tried.

 

See screenshot of flow below:

image.png

Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on at

    Could you please show me that how do you implement "control a document library's files from a separate document library in the same SharePoint site."

     

    I understand that "Mirrored Delete from between SharePoint Document Libraries" is that copied file and original file have the same name with extension. When you delete the original file, the copied file is also deleted.

     

    According to the flow of the screenshot you provided, the delete operation cannot be performed because the File identifier cannot be obtained.

     

    Perhaps you could use "Send a Http request to SharePoint" action to delete the corresponding file.

     

    As you said, I created a flow, Copy files from one SharePoint Online account or folder to another, used to synchronize files. Now they have the same file.

     

    2.PNG

     

    1.PNG

     

    Use http delete request to delete files. Because the file names of the two files are the same, we can use the file name obtained by the previous action to determine the address of the file and Uri address, as below:

     

    3.PNG

     

    The flow works successfully as below:

     

    4.PNG

     

    For more details on SharePoint http request, please refer to link:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest

     

    Please take a try and let me know if issue still exists.

     

    Best Regards,

    Barry

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much for the input. I tried the suggested steps, but now I am getting a Forbidden warning. I want the source library to be accessible for view only, but I don't want to allow users to delete items directly. It appears the HTTP request wants to see edit rights for the library?

     

    EDIT: Nevermind I had the wrong user for the connection, it works now! Thank you!

  • ttungl Profile Picture
    9 on at

    Thanks for the detail. I got the error with the delete trigger, do you know how to fix it? Thanks!

    Screenshot 2023-09-21 at 12.30.45 PM.png

  • ttungl Profile Picture
    9 on at

    Thanks for sharing!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard