Skip to main content

Notifications

Community site session details

Community site session details

Session Id : bUpWYupPkHLKdBBdftkBGa
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 29 Sep 2023 06:40:43 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 😊

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on 29 Sep 2023 at 07:10:59
    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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 87

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard
Loading started