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 / Restore item from shar...
Power Automate
Answered

Restore item from sharepoint list using power automate

(0) ShareShare
ReportReport
Posted on by 38

Hello, I would like to access the properties of an item that has been deleted from the sharepoint list.
In my example, vacation requests are inserted as an item in the sharepoint list, but they can also be deleted manually from the list. I have created a trigger via the flow that when an item is deleted, it sends out an email stating who has deleted this item and I would also like to include the properties, e.g. applicant, in this email.

I can't find the best way to implement this

Translated with DeepL.com (free version)

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Ensosim,

    If you want to access to the properties of the deleted item in your email body, you are limited on what you can capture from them. Currently, When an item is deleted triggers only captures six parameters for use, please note that only the following elements is avaible from the deleted trigger:

    vqiaqimsft_1-1704716842693.png

    If you want to restore the deleted item, you could only call an API to restore it.

    vqiaqimsft_0-1704716399337.png

     

     

  • Ensosim Profile Picture
    38 on at

    Man thank you <3.

    But it doesnt work, i think i missed something.

    Display unformatted input:

    {
        "host": {
            "connectionReferenceName": "shared_sharepointonline",
            "operationId": "HttpRequest"
        },
        "parameters": {
            "parameters/method": "GET",
            "parameters/uri": "/api/web/RecycleBin?$filter=startswith(LeafName,'591') and Title eq ''",
            "parameters/headers": {
                "Accept": "application/json;odata=nometadata",
                "Content-Type": "application/json;odata=nometadata"
            }
        }
    }
    401 UNAUTHORIZED
    clientRequestId: 68cec08d-0ab1-4337-a09b-e2e2f3a965e9
    serviceRequestId: 71b8ffa0-f033-7000-ca12-469113bcffb6
     
    This is my URI
    /api/web/RecycleBin?$filter=startswith(LeafName,'@{triggerOutputs()?['body/ID']}') and Title eq '@{triggerOutputs()?['body/Name']}'
     
    Ensosim_0-1704722243086.png

     

     
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Ensosim,

    1). Check if there is any space in your uri

    2). Are you able to view the membership of the Site Owners group. 

    3). Here is the URI to filter on LeafName and Title of the list item

    _api/web/RecycleBin?$filter=startswith(LeafName,'@{triggerOutputs()?['body/ID']}') and Title eq '@{triggerOutputs()?['body/Name']}'

    4). URI to restore the first item found in the previous HTTP request:

    _api/web/RecycleBin('@{first(outputs('Send_an_HTTP_request_to_SharePoint')?['body']['value'])['Id']}')/Restore

     

  • Ensosim Profile Picture
    38 on at

    perfect it works <3. No i can retrieve item properties, thank you and i can put it into the email as information. But if i want to delete the item again, i will go into a loop. How can i avoid it.

     

    Thank you ❤️

  • Ensosim Profile Picture
    38 on at

    Actions in this flow can lead to an infinite trigger loop. Add appropriate condition checks to prevent this flow from triggering itself.

     

    Ensosim_0-1704964606589.png

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard