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 URL/locatio...
Power Automate
Answered

How to get URL/location of deleted file in e-mailtext sent out

(0) ShareShare
ReportReport
Posted on by 29

Hello, please help me.

 

I have set ut an automatic flow that runs fine. It's when a file is deleted from a sharepoint site it sends an e-mail to an mailbox with name of file and time of deletion.

In the text of the e-mail sent out it says the filename and who it was deleted by. 

But I really want to get the file/folder location of the file where it was stored/deleted from. Is there any way to do this?

 

It looks like this now - and it works, but I would like the e-mail text to show where the file was deleted from with url or path:

plshelpme_0-1681384350243.png

 

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @plshelpme,

     

    You can find those details in the Recycle bin, where the file should be located. Place a Send an HTTP request to SharePoint action in between the two actions and filter for the right file name. The outputs should list a DirName value, which contains the original path.

     

    Below is an example

     

    1. URI Send an HTTP request to SharePoint action

    _api/web/RecycleBin?$filter=LeafName eq '@{triggerOutputs()?['body/FileNameWithExtension']}'&$select=DirName

     

    2. Expression to retrieve the DirName value of the first item which matches the filter

    first(outputs('Send_an_HTTP_request_to_SharePoint')?['body']['value'])['DirName']

     

    dirname_recyclebin.png

     

  • plshelpme Profile Picture
    29 on at

    @Expiscornovus Thank you! It worked! 🙂

  • plshelpme Profile Picture
    29 on at

    Hello again,

     

    My flow suddenly stopped working. Please see here: https://powerusers.microsoft.com/t5/General-Power-Automate/Error-on-Send-an-email-V2-expression/m-p/2142275#M125707

    Do you have perhaps any solution to this?

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
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard