web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get item from r...
Power Automate
Answered

How to get item from recycle bin

(2) ShareShare
ReportReport
Posted on by 160
Hello,
 
Here is what I am working. I have a SharePoint list of users called coordinators. If a coordinator is removed from the list I want the person also removed from a SharePoint group. I know how to use an HTTP Request to remove the user from the group. What I need help with is retrieving the user information from the recycle bin when it is deleted. I have tried several tutorials using an HTTP request but nothing is returned. One tutorial is Accessing SharePoint Recycle Bin using Microsoft Flows - CloudFronts

Can someone help me get the details of a deleted item from a list. I have started with the When an item is deleted trigger but I am stuck there.
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    11manish Profile Picture
    3,333 on at
    The main challenge is that when the "When an item is deleted" trigger fires, the SharePoint list item has already been removed. Therefore, Power Automate
     
    usually has access only to limited metadata (such as the Item ID), and retrieving the full item details from the SharePoint Recycle Bin is often unreliable.
     
    I would not recommend using the SharePoint Recycle Bin to retrieve deleted coordinator details. The most reliable options are:
    • Use a Status/Inactive flag instead of deleting records (preferred).
    • Maintain an audit/reference list containing the coordinator details.
    • Perform the SharePoint group removal before deleting the list item.
    As an immediate troubleshooting step, inspect the output of:
     
    • triggerOutputs()
    from the When an item is deleted trigger. You may find that the coordinator's email or person field information is already available, eliminating the need to access
     
    the Recycle Bin altogether.
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    for your specific use case there's a simpler path.
     
    The "When an item is deleted" trigger in Power Automate already returns the item's field values at the time of deletion, including Person column data. Check your trigger output by adding a Compose action with triggerBody() you'll likely find the coordinator's email address is already there without needing the recycle bin at all.
     
    For a Person column, the email is typically at:
    triggerBody()?['coordinator_email']
    or the claims format:
    triggerBody()?['coordinator/Email']
     
    The exact path depends on your column's internal name. Check the trigger output first before building the recycle bin logic.
     
    If the Person field isn't in the trigger output, the cleanest solution is 11manish's suggestion: use the "When an item is modified" trigger with a condition checking if a status column changed to "Inactive" instead of deleting. This gives you full access to all item data before it's removed.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi @FW-07051511-0,
     
    The reson not to choose the recycle bin:
    • The recycle bin stores deleted items but Power Automate cannot directly query it or trigger on recycle bin events.
    • By the time the item is in the recycle bin, the flow trigger won’t fire.
    • The "When an item is deleted" trigger is the reliable way to get deleted item info.
     
    Good choice would be:
    • Trigger: When an item is deleted (SharePoint trigger on your coordinators list)
    • Action: Extract user info (e.g., email or login name) from the deleted item properties
    • Action: Use HTTP request to remove that user from the SharePoint group
     
    Reference:
     
    1. Remove user from SP group.
    2. Remove user (community thread)
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • FW-07051511-0 Profile Picture
    160 on at
     
    You got me going into the right direction. I already had an option for a status of Active or Inactive and the workflow to remove the user from the SP Group worked beautifully. 
     
    However, on the delete action instead of using a cloud automate flow I used a Power Apps flow and call it when the user clicks the delete button in the app. This also worked out beautifully.
     
    Thanks for giving me a push in the right direction and for an informative post.
  • FW-07051511-0 Profile Picture
    160 on at
     
    I tried you suggestion but the compose on triggerBody() only returned the word triggerBody() there was nothing else there to reference.
     
    Thanks for you input.
  • FW-07051511-0 Profile Picture
    160 on at
     
    The When Item is Deleted trigger didn't provide enough information. I could not get the coordinator's email/claim for the HTTP request to remove them from a SP group. I went with a Power Apps (V2) trigger so I could call the flow from the Power App when the user clicked the delete button.
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    As was mentioned above, you should use the trigger when an item or file is deleted. This will not return very much information since the file/item no longer exists, but it should tell you who deleted it and when.
     
    If you are a site owner, you can then use an HTTP request to list the items in the recycle bin:
     
    You can follow this with a parse JSON action to get the values, although it will not return much but it will return who deleted the item/file and when. 
     
    This is the scheme:
     
    {
        "type""object",
        "properties": {
            "d": {
                "type""object",
                "properties": {
                    "results": {
                        "type""array",
                        "items": {
                            "type""object",
                            "properties": {
                                "__metadata": {
                                    "type""object",
                                    "properties": {
                                        "id": {
                                            "type""string"
                                        },
                                        "uri": {
                                            "type""string"
                                        },
                                        "type": {
                                            "type""string"
                                        }
                                    }
                                },
                                "Author": {
                                    "type""object",
                                    "properties": {
                                        "__deferred": {
                                            "type""object",
                                            "properties": {
                                                "uri": {
                                                    "type""string"
                                                }
                                            }
                                        }
                                    }
                                },
                                "DeletedBy": {
                                    "type""object",
                                    "properties": {
                                        "__deferred": {
                                            "type""object",
                                            "properties": {
                                                "uri": {
                                                    "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": {
                                        "__metadata": {
                                            "type""object",
                                            "properties": {
                                                "type": {
                                                    "type""string"
                                                }
                                            }
                                        },
                                        "DecodedUrl": {
                                            "type""string"
                                        }
                                    }
                                },
                                "Id": {
                                    "type""string"
                                },
                                "ItemState": {
                                    "type""integer"
                                },
                                "ItemType": {
                                    "type""integer"
                                },
                                "LeafName": {
                                    "type""string"
                                },
                                "LeafNamePath": {
                                    "type""object",
                                    "properties": {
                                        "__metadata": {
                                            "type""object",
                                            "properties": {
                                                "type": {
                                                    "type""string"
                                                }
                                            }
                                        },
                                        "DecodedUrl": {
                                            "type""string"
                                        }
                                    }
                                },
                                "Size": {
                                    "type""string"
                                },
                                "Title": {
                                    "type""string"
                                }
                            },
                            "required": [
                                "__metadata",
                                "Author",
                                "DeletedBy",
                                "AuthorEmail",
                                "AuthorName",
                                "DeletedByEmail",
                                "DeletedByName",
                                "DeletedDate",
                                "DeletedDateLocalFormatted",
                                "DirName",
                                "DirNamePath",
                                "Id",
                                "ItemState",
                                "ItemType",
                                "LeafName",
                                "LeafNamePath",
                                "Size",
                                "Title"
                            ]
                        }
                    }
                }
            }
        }
    }
     
    You could then filter the results on the deleted by and deleted date values from the trigger:
     
    This is the filter, which you will need to revise to replace the hard coded values with the corresponding values from the trigger:
     
    {
        "body": [
            {
                "__metadata": {
                    "id": "https://domainnam.sharepoint.com/sites/sharepointsite/_api/Site/RecycleBin(guid'd4f3851a-5db4-4612-a627-3fd8c40549e2')",
                    "uri": "https://domainnam.sharepoint.com/sites/sharepointsite/_api/Site/RecycleBin(guid'd4f3851a-5db4-4612-a627-3fd8c40549e2')",
                    "type": "SP.RecycleBinItem"
                },
                "Author": {
                    "__deferred": {
                        "uri": "https://domainnam.sharepoint.com/sites/sharepointsite/_api/Site/RecycleBin(guid'd4f3851a-5db4-4612-a627-3fd8c40549e2')/Author"
                    }
                },
                "DeletedBy": {
                    "__deferred": {
                        "uri": "https://domainnam.sharepoint.com/sites/sharepointsite/_api/Site/RecycleBin(guid'd4f3851a-5db4-4612-a627-3fd8c40549e2')/DeletedBy"
                    }
                },
                "AuthorEmail": "David.Surname@domain.com",
                "AuthorName": "Surname, David",
                "DeletedByEmail": "David.Surname@domain.com",
                "DeletedByName": "Surname, David",
                "DeletedDate": "2026-03-09T13:29:43Z",
                "DeletedDateLocalFormatted": "3/9/2026 9:29 AM",
                "DirName": "sites/sharepointsite/Lists/layer2schedule",
                "DirNamePath": {
                    "__metadata": {
                        "type": "SP.ResourcePath"
                    },
                    "DecodedUrl": "sites/sharepointsite/Lists/layer2schedule"
                },
                "Id": "d4f3851a-5db4-4612-a627-3fd8c40549e2",
                "ItemState": 1,
                "ItemType": 3,
                "LeafName": "293_.000",
                "LeafNamePath": {
                    "__metadata": {
                        "type": "SP.ResourcePath"
                    },
                    "DecodedUrl": "293_.000"
                },
                "Size": "240",
                "Title": "Test Item"
            }
        ]
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard