Accessing SharePoint Recycle Bin using Microsoft Flows

 Introduction:

This blog provides steps to follow in order to access the SharePoint Recycle Bin in MS Flows 

 

Steps:

  1. In Actions, select "Send an HTTP request to SharePoint"

 

 

 

  1. Enter the below details:

Site Address: Select your site address from the list.

Method: GET

Uri:_api/web/recycleBin?$filter=DeletedDate eq datetime'Time Deleted' and DeletedByName eq 'Deleted by' and Title eq 'Filename with extension'.

Headers: 

Accept

application/json

Pls. Note: The parameters marked in yellow are  taken from the trigger "when a file is deleted in SharePoint"

Graphical user interface, text, application, email

Description automatically generated

 

  1. Select Action "Parse JSON" 

Graphical user interface, text, application

Description automatically generated

 

  1. In parse JSON, the content is the body of HTTP Response

Enter the below Schema:

{

"type": "object",

"properties": {

"odata.metadata": {"type": "string"},"value": {"type": "array","items": {"type": "object",

"properties": {"odata.type": {"type": "string"},"odata.id": {"type": "string"},

"odata.editLink": {"type": "string"},"AuthorEmail": {"type": "string"},"AuthorName": {

"type": "string"},"DeletedByEmail": {"type": "string"},"DeletedByName": {"type": "string"},

"DeletedDate": {"type": "string"},"DeletedDateLocalFormatted": {"type": "string"},

"DirName": {"type": "string"},"DirNamePath": {"type": "object","properties": {

"DecodedUrl": {"type": "string"}}},"Id": {"type": "string"},"ItemState": {"type": "integer"},

"ItemType": {"type": "integer"},"LeafName": {"type": "string"},

"LeafNamePath": {"type": "object","properties": {"DecodedUrl": {"type": "string"}}},

"Size": {"type": "string"},"Title": {"type": "string"}},"required": [

"odata.type","odata.id","odata.editLink",

"AuthorEmail","AuthorName","DeletedByEmail",

"DeletedByName","DeletedDate","DeletedDateLocalFormatted","DirName","DirNamePath","Id",

"ItemState","ItemType","LeafName","LeafNamePath","Size","Title"]

}}}}

Graphical user interface, text, application

Description automatically generated

 

 

Sample Output:

Graphical user interface, text, application, email

Description automatically generated


Comments

Popular posts from this blog

The supplied reference link is invalid Error in Cloudflows

Set Dynamic Recipients of D365 Email in Power Automate

Retrieve Email Recipients (TO, CC, BCC) in Cloud Flow