cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlbaker
Level: Powered On

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
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 310 members 4,745 guests
Please welcome our newest community members: