cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jrath
Frequent Visitor

How do we add an enhancement request for the Power Automate Team - Sharepoint?

The SharePoint trigger - When a file is deleted, has an option to either monitor a folder or the site for a file deletion. Regardless of which option you use the results returned are DeletedItem . refer to this site: https://docs.microsoft.com/en-us/connectors/sharepointonline/#when-a-file-is-deleted for details. If you choose the option to monitor the site, the returned results in my case are useless without knowing the folder where the file was located. Enhancement request: Is it possible to add the folder path to the DeletedItem data?

1 ACCEPTED SOLUTION

Accepted Solutions
jinivthakkar
Memorable Member
Memorable Member

@jrath I have tried this work around, see if this works for you.

 

I have create a Sharepoint list which stores file name and path when an item is created:

jinivthakkar_0-1614328905202.png

My flow which creates item in list with filename and path

jinivthakkar_1-1614328986266.png

 

and then I have another flow just like you have, on deletion of file:

jinivthakkar_2-1614329058681.png

In this flow, when file is deleted I query the list created in step one and get the path of the file.

jinivthakkar_3-1614329151779.png

 

Hope this helps.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

4 REPLIES 4
Expiscornovus
Super User II
Super User II

Hi @jrath,

 

You could post the enhancement request in the Power Automate Ideas section:

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas

 

I am also seeing an idea which looks pretty similar to your request btw:

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/SharePoint-When-a-file-is-deleted-Provide-a...

 

Hope this helps a bit?

jinivthakkar
Memorable Member
Memorable Member

@jrath I have tried this work around, see if this works for you.

 

I have create a Sharepoint list which stores file name and path when an item is created:

jinivthakkar_0-1614328905202.png

My flow which creates item in list with filename and path

jinivthakkar_1-1614328986266.png

 

and then I have another flow just like you have, on deletion of file:

jinivthakkar_2-1614329058681.png

In this flow, when file is deleted I query the list created in step one and get the path of the file.

jinivthakkar_3-1614329151779.png

 

Hope this helps.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

jrath
Frequent Visitor

jinivthakkar,

       it is sad that we have to create all of these workarounds because someone forgot to add a value to an output ... thanks ...

DamoBird365
Community Champion
Community Champion

Hi @jrath,

 

A possible option to explore is the Recycle Bin API.  

 

DamoBird365_0-1614365181812.png

From this you could filter the results which include the original path:

 

"AuthorEmail": "damien@abdndamodev.onmicrosoft.com",
"AuthorName": "Damien A Bird",
"DeletedByEmail": "damien@abdndamodev.onmicrosoft.com",
"DeletedByName": "Damien A Bird",
"DeletedDate": "2021-02-26T17:53:35Z",
"DeletedDateLocalFormatted": "2/26/2021 9:53 AM",
"DirName": "sites/DamoBird365/Shared Documents/General/Test1",
"DirNamePath": {
"__metadata": {
"type": "SP.ResourcePath"
},
"DecodedUrl": "sites/DamoBird365/Shared Documents/General/Test1"
},
"Id": "02489a69-8d79-4f5f-a355-2330ecd5cff8",
"ItemState": 1,
"ItemType": 1,
"LeafName": "test.txt",
"LeafNamePath": {
"__metadata": {
"type": "SP.ResourcePath"
},
"DecodedUrl": "test.txt"
},
"Size": "408",
"Title": "test.txt"

 

You could filter the array on "DeletedDate" and "Title" and then recover the "DirName".

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (46,128)