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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Deleting files from Sh...
Power Automate
Unanswered

Deleting files from SharePoint Library / MS Form responses folder after MS Forms was submitted with Power Automate

(0) ShareShare
ReportReport
Posted on by 41

Hi All,

I'm new to PA and stuck with one flow... I have a MS Form that triggers the flow upon submission. The Form has 'Upload file' question. After the form is submitted and files uploaded, the response is saved in MS List with files added as attachments to the List Item. I take it further from there and I don't need the original files in MS Forms folder anymore. I figured this much, now I want to delete the files from the library Documents > Apps > Microsoft Forms as I have limited storage for this SharePoint and I want to spare us manual cleaning.

iguana_0-1712857908775.png

I wanted to use the Delete File action, but it requires File Identifier which Get file metadata doesn't return, and [Id] it does return - doesn't work for this action. I can't find a way to retrieve the [ID] (that is an integer, not a random set of letters and numbers that I get with Get file metadata action). I was thinking about 'Send HTTP request to SharePoint' action with DELETE method, but I don't know what to type in Uri...

Can anyone help?

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @iguana 

     

    You can get the Id using Get File metadata using path.

     

    Try the below

     

    image.png

  • iguana Profile Picture
    41 on at

    thanks @abm. It wasn't the solution, but helped me find it by adding Get file properties after (turned out Delete file needs Identifier, not ID...).

    iguana_0-1712903773794.png

     

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @iguana 

     

    If you are using Get File  metadata using path then you don't need to use Get File Properties for deleting the file.

     

     

    image.png

     

    Here is the unit test result.

     

    image.png

     

  • iguana Profile Picture
    41 on at

    @abm it works with Id from Get File metadata using path. Thanks a milion!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard