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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to delete a files ...
Power Automate
Unanswered

How to delete a files from sharepoint at the end of my flow?

(0) ShareShare
ReportReport
Posted on by 25

Hi,

I have made a flow that pulls email attachements into sharepoint then moves data from the created files into a master file. 

However, when the data is extracted I would like to delete these attachements, so that the sharepoint folder does not get over populated with files.

I am new to using flows so it would be much appreaciated if someone could show me a way to get rid af these files once they have served their purpose 😊

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: How to delete a files from sharepoint at the end of my flow?

    Hi @Lasse4 

     

    You can use "Delete file" action to delete the file in SharePoint folder. This action requires the file identifier as input:

    ManishSolanki_1-1695971176724.png

     

    File identifier can be obtained from "Get file properties" action which accepts the Id of the SharePoint file as input:

    ManishSolanki_0-1695971108774.png

     

    Using the combination of those actions you will get the identifier from dynamic content window as shown below & able to delete the file:

    ManishSolanki_2-1695971352925.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard