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 / When a file is created...
Power Automate
Unanswered

When a file is created, modified, or deleted Sharepoint flow?

(0) ShareShare
ReportReport
Posted on by

I just started using power automate a couple weeks ago so I'm definitely a rookie at this. Anyways, so far my flow looks like the photo attached below. This allows any creation/modification that takes place in Folder A to occur in Folder B, except when you delete the file in Folder A. I would like to add on to my flow to include if a file is deleted in Folder A then the connected file is deleted in Folder B. Any suggestions how I could make the deleting part of this work? Or you can tell me I'm crazy for thinking this is possible! Thanks!

Capture.JPG

 

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Russel1 

    Take a look at the SharePoint When a file is deleted trigger.  I suspect it will meet your needs.

    Let me know if you need an example.

     

     

  • sudharsan1985 Profile Picture
    1,325 on at

    Hi @Russel1 

    There should be 2 flows, created and modified in one and deleted should be an other flow. There is a separate trigger called 'When a file is deleted'.

    FileDeleted Trigger.png

    Once the file is deleted the above trigger is fired, try to use the action 'Get Files(properties only)' based on the filename from 'Folder A', once received the properties, use the 'File ID' to delete the same file in 'Folder B' by using the action 'Delete File' action.

    Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
    -Sudharsan K...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I realize the thread is a year old but did anyone find a solution? Like the OP, I need a flow to automatically delete from Folder B when manually deleted from Folder A. Created or modified flow is working perfectly but I can't figure out the delete. I've tried other suggestions such as get file metadata and http request to access the Recycle Bin but nothing has worked. Thank you!

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Anonymous 

    The solutions provided above should work.  Use the When a file is deleted trigger.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Scott,

    Thanks for the prompt reply. Here's two of the flows I've tried that are failing:

    Using Delete and get metadata from the recycle bin:

    towergr_2-1619033934980.png

    It fails getting the metadata:

    towergr_3-1619034001891.png

    And if I try it with get properties:

    towergr_4-1619034112182.png

    It fails to find the file:

    towergr_5-1619034161580.png

    Any suggestions?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    SOVLED! I was adding more complexity than necessary. All I need is 'When a file is deleted" and "Delete file". No need to look for metadata or file properties. The Flow is working now. Here's a screenshot:

    towergr_0-1619098963758.png

    Note in "Delete File", you need to change any "/" in the file identifier path to "%2F" (without the quotes) as the Flow needs JSON format. 

     

    Thanks for the help!

  • mkipoweruser Profile Picture
    2 on at

    Hi, I currently tried to implement that deletion trigger as well. But I get an error message that only Site Collection Admins could use this trigger. Problem is that I am Site Collection Admin. But the message is still occuring. Did somebody face this issue as well?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 636

#2
Valantis Profile Picture

Valantis 372

#3
11manish Profile Picture

11manish 335

Last 30 days Overall leaderboard