cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jlbaker
Regular Visitor

SharePoint "When an item is deleted" trigger - access metadata of deleted item

Hi there,

 

I'm trying to access the metadata of a deleted item.  However, the Dynamic content under "When an item is deleted" consists only of Deleted by, Filname with extension, ID, Is folder, Name, and Time deleted.

 

I tried Get Item with the ID.  That failed of course with an Item not found because the item was already deleted and in the recycle bin.

 

I also tried a Send an HTTP request to SharePoint with a GET for the RecycleBin but that just returns similar metadata as When an item is deleted.

 

I noticed that a couple new Dynamic content items appear under When an item is deleted when you click in a comparison field of a Condition step.  They are Item and List of Deleted items.  Searching as proved fruitless as to what these fields do, how to use them, and will they do what I want them to do.  Do you have any insight?

 

The only other option I thought of is to restore the item from the recycle bin, get its metadata, and then delete it again.  But again, I wasn't able to find any search results.  Any tips here?

 

Any other ideas on how to tackle this problem?  I'm not really interested in writing the metadata I need into the Title field.

 

Thank you!

2 REPLIES 2
Dual Super User
Dual Super User

Re: SharePoint "When an item is deleted" trigger - access metadata of deleted item

Hi @jlbaker 

 

There is a bug that has been identified in the When an Item/ File is deleted trigger for SP and some of the information is missing from the body when the flow is triggered. the bug is already raised here:https://powerusers.microsoft.com/t5/I-Found-A-Bug/When-a-file-is-deleted-SharePoint-action-not-retri... and should be fixed soon in the next releases. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

jlbaker
Regular Visitor

Re: SharePoint "When an item is deleted" trigger - access metadata of deleted item

Thank you, yashag, for the quick response. I am experiencing the missing information in the body issue you mentioned. However, that is of way less concern than getting at the metadata of the deleted item. It doesn’t look like the item’s full metadata is available in the body by design for this trigger, only the subset. So, I am needing an alternate way of getting the item’s full metadata. Therefore, do you happen to have any input on the questions in the later part of my post…

 

“I noticed that a couple new Dynamic content items appear under When an item is deleted when you click in a comparison field of a Condition step. They are Item and List of Deleted items. Searching has proved fruitless as to what these fields do, how to use them, and will they do what I want them to do. Do you have any insight?

 

The only other option I thought of is to restore the item from the recycle bin, get its metadata, and then delete it again. But again, I wasn't able to find any search results on how to do this. Any tips here?

 

Any other ideas on how to tackle this problem? I'm not really interested in writing the metadata I need into the Title field, which is available in the subset.”

 

Thank you.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,781)