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 / When a file is deleted...
Power Automate
Answered

When a file is deleted in sharepoint - get path of deleted file

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi PA team!

 

I have a bit of an issue in one of my flows. My flow is triggered when a file is deleted in "Documents" on my sharepoint site. I have multiple folders within "Documents", and rather than hardcoding a flow for each of the folders I would like to have one single flow. I need the path of the deleted sharepoint file, but it does not appear in the dynamic content. Anyone with a smart workaround? 

 

mathias4_0-1683801783386.png

 

Any help is much appreciated!

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @mathias4 

     

    In dynamic content, there is no variable to get the filepath of deleted file 

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Nived, thank you very much for your reply. Do you know if there are any workarounds to this?

  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @mathias4 

     

    Well trying in different way, i got the folder path from which file was deleted, to which i combined filename to get complete path of file.

     

    Nived_Nambiar_0-1683809162277.png

     

    here i have recyclebin to get the details of deleted file and its give will give the directory name from which file is deleted. at last in compose you can see i have written an expression to get the complete file path like below

     

    concat(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?['DirName'],triggerOutputs()?['body/FileNameWithExtension'])

     

    Hope it helps !

    Mark it as solution if it resolves your query !

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Amazing! Thank you very much!

  • AnthonyNguyen Profile Picture
    2 on at

    Thanks for your help. But what if we delete same file name multiple times?

  • joesto Profile Picture
    2 on at

    And how do I get the 'Compose' [concat(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?['DirName'],triggerOutputs()?['body/FileNameWithExtension'])] into a message???

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard