In my post about the When a file is deleted trigger in Microsoft Flow I described the trigger that will fire when a document is deleted.
The trigger however will be quite useless if you want to do anything as there isn’t much information available within the information returned. One of my followers asked todayon the post mentioned above if it was possible to email the author when someone deletes document.
But no need to panic!
As so often the Send an HTTP request to SharePoint action will come to the rescue.
The /api/web/RecycleBin REST API will give you all the documents that were deleted.
Then you can add a filter so that only the documents with the same file name are returned. In a similar way you could also include the Time deleted as a filter. But I would like to keep the example in this post simple.
To get the email address for the author’s email address the following expression will get the job done: