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 / Delete File after adde...
Power Automate
Answered

Delete File after added to SharePoint List

(0) ShareShare
ReportReport
Posted on by 20

Hello together,

 

I've created a flow that collects informations and documents using Microsoft Forms. The flow works fine. In this flow, a file will be uploaded and save in my OneDrive. Now I want the document to be deleted afterwards. I'm trying to use the following actions

 

Bildschirm­foto 2023-02-25 um 18.31.46.png

 

But I always get the following error message.

Bildschirm­foto 2023-02-25 um 18.32.53.png

 

Can anybody tell me, what I'm doing wrong?

 

Kind regards

 

Kai

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Kai_U_P ,

    when you 'Peek code' on the 'Delete file' action you'll see that the action doesn't use the file path, it uses the file ID.

    image.png

    To delete the file you'll need to get its ID first with the 'Get file metadata using path', that'll give you the file ID and you can delete it.

    image.png

  • Matthy79 Profile Picture
    4,188 Super User 2024 Season 1 on at

    Hello @Kai_U_P

     

    You need the ID of the file when using this action. You can get the ID by using something like "Get file metadata using path" (I don't know what it is called in German). I would also recomment to switch Power Automate to English. It will help you to find actions and it is easier to understand what you are doing for people here.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello Tom,

     

    It worked 🙂

     

    Thank you very much and have a nice Sunday.

     

    Kind regards

     

    Kai

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 707

#2
Haque Profile Picture

Haque 475

#3
Valantis Profile Picture

Valantis 456

Last 30 days Overall leaderboard