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 / Get Custom File Proper...
Power Automate
Suggested Answer

Get Custom File Properties From Delete Trigger

(1) ShareShare
ReportReport
Posted on by 13

Hey!

I’m working with a SharePoint document library that has custom columns, and I need to retrieve the value of one of these custom columns after a file is deleted.
However, I’ve run into a problem: When using the "When a file is deleted" trigger in Power Automate, the trigger body doesn’t include any of the custom column values, it only provides:

  • Id
  • File name
  • File name with extension
  • Deleted by
  • Deleted at
  • Is folder (boolean)

To work around this, I tried using a "Get file metadata" or "Get file properties" action after the trigger, but this failed because the file was already in the recycle bin and couldn't be found anymore.
I also tried specifying the recycle bin in the library selection, but unfortunately, that’s not possible either.
To test my assumption, I restored the deleted file and re-ran the flow with a previous event. This worked, so the issue is clearly that deleted files can't be accessed via standard actions once they’re in the recycle bin.

My question is: Is there any way to retrieve custom column values for a file that has been deleted, using the on delete trigger or any workaround you can recommend?

Thanks in advance!

 
Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at
    My understanding is that additional properties of a file beyond what is provided by the trigger are not available.  I just did a quick check to see if those properties are available via an API call of some type with no success.
     
  • stampcoin Profile Picture
    5,158 Super User 2026 Season 1 on at
    @dq Hi,
    You might want to consider some 'backup plan', for example create a image List the same as your current ( or you might need the file's metadata only).
    Once the record/item deleted, you get the name, and you will get the info from the backup list..
    Or, you fetch it out from the bin ( restore), and get what you want, then drop to bin ( make sure you flow doesn't get in the dead loop).😊
    Or, save the metadata in other place, like dataverse, excel, etc.
     
     
     
  • Suggested answer
    rzaneti Profile Picture
    4,476 Super User 2026 Season 1 on at
    Hi @dq,
     
    I didn't test for custom properties, but maybe the Recycle Bin API can help you. It retrieves all files in the Recycle Bin from a given Site. This is how you call it from Power Automate::
     
     
     
    One downside: the Recycle Bin API do not use the user-friendly IDs from the SharePoint Document Libraries (numbers from 1 to n), but GUID instead. However you still can use the folder path (DirName property in the API response) and the file name (LeafName property in the API response) to identify the file that triggered the flow. 
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard