cancel
Showing results for 
Search instead for 
Did you mean: 

Need a Sharepoint trigger when a list item is deleted

It seems like basic functionality to have a trigger when a Sharepoint list item is deleted, but somehow, that functionality doesn't exist. I'm not sure exactly how you could have created a trigger for when a list item is created and NOT realized, 'hey, maybe we need to have a trigger for when the item is deleted, too'!

Status: Completed

Good news - this item is completed, you can read about it in this blog post : https://flow.microsoft.com/blog/share-with-sharepoint-office-365/ - there are now triggers for both When an Item is delete and When a file is deleted. Thanks!

Comments
Anonymous
Not applicable

Please prioritize this feature!

Power Automate
Status changed to: Completed

Good news - this item is completed, you can read about it in this blog post : https://flow.microsoft.com/blog/share-with-sharepoint-office-365/ - there are now triggers for both When an Item is delete and When a file is deleted. Thanks!

New Member

This is NOT conpleted....when you select as a trigger when an item is deleted (i.e., a list item not a file), teh available properties and body for the trigger are the same as for a file deletion, only in the case of a list item the only data available is the ID of the item and timeDeleted, DeletedBy. What is most often needed when a list item is deleted is the metadata for that item, not just the ID.

 

Here's the common scenario: 

 

A parent list item (e.g, a Customer record) is deleted; the Flow needs to go to the CustomerOrders List (chid list) and update or delete any items related to the Customer that was deleted. So the Flow needs to Get items from CustomerOrder list, with an OData filter on the CustomerName. 

Advocate I

This is nice to have, but not completely useful without access to all columns/values from the deleted list item. Can those be included in the dynamic content within Flow?

Advocate IV

This is very useful, but it would be really great if I could get column values from the deleted item.

 

I have a Flow that creates an event in Outlook 365 calendar. The Flow stores the id of the Outlook event in a custom field in the SharePoint list. Obviously, all very good, but this all breaks down if an item is deleted from the SharePoint list but it still remains in the Outlook calendar.

 

When the item is deleted from a SharePoint list, I would need to get the Outlook event id, in order to run an action to delete it (or even simply update the Outlook event to show that the event has been deleted).

 

Unfortunately the only dynamic content about the deleted SharePoint list item appears to be: Name, Filename with extension, Time deleted, Deleted by, ID and Is folder.

 

If only additional field data were accessible, I would be able to create a dynamic relationship between the SharePoint list and Outlook 365 calendar.

 

Instead of creating a separate Flow to delete the Outlook event, I've tried to add the trigger to the original Flow, but "When an item is deleted" only works when any item is deleted and not when a specific item (referenced by an ID) is deleted, so that does not work. If there were some way to store global variables that could be accessed by any Flow, that too might help solve the problem.

 

If anyone knows how this could be achieved, I would greatly appreciate any suggestions.

 

Thanks.

 

Helper II

@StephenYou cannot claim that this request has been implemented when the implementation does not even allow us to access the fields of the record that was deleted (I am using a CDS entity, not a SP list, but both have the same severe limitation).

 

Here is a request to propertly implement this feature. Please upvote.

https://powerusers.microsoft.com/t5/Flow-Ideas/Trigger-for-when-CDS-Common-Data-Service-record-is-de...

Regular Visitor

You got my upvote.

 

Brian make an excellent point, just because the added feature may have fulfilled your current need doesn't mean it's a complete feature. Everyone who voted this up originally should upvote the new request so we can get a more robust delete trigger w/ data access.

New Member

Desperately need a trigger for a sharepoint file download/view too.

New Member

I suppose that there is a possible way to outcome this with a workaround as described below.

 

  1. Enable the Workflows can use app permissions feature on the SharePoint site.
  2. Remove the Delete permission from the user group of the users that access the list
  3. Create an additional "Delete Object" Column on your list (can be yes/no checkbox with No as default value
  4. Create a new stage i your workflow with an App Step (to elevate the users permissions when at this stage)
  5. On the related stage within the App Step there is an action option to "Delete Item" under "List Actions". This can be correlated with the condition of the "Delete Object" that has been created on step 3.

I hope this is helpfull