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 Automate - Building Flows
Suggested answer

Delete HTML file from OneDrive Document Folder

(0) ShareShare
ReportReport
Posted on by 5,195 Super User 2025 Season 2
I have created a flow that generates an HTML and PDF file.

Once the PDF file is generated, I want the flow to delete the associated HTML file.

I have added a 'Delay' (1 min.) action to make sure the files are generated successfully.

My flow keeps kicking back and error that the HTML file cannot be found (404 error).

The HTML is file can be seen in the folder (see below).

What am I missing. 

Flow -


Document Folder -
 
Flow Error -
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    989 Super User 2025 Season 2 on at
    Delete HTML file from OneDrive Document Folder
    Is the .html file you want to delete created earlier in the same flow?  If so, try refering to it by the ID output of the action that created the file.

  • Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Delete HTML file from OneDrive Document Folder
    Will using the 'ID' delete all items in the Document folder (which is why I was using the file name)?

    How will the flow know to ONLY delete the newly created html file?
  • Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Delete HTML file from OneDrive Document Folder
    I implemented your recommendation and used 'Id' in the 'Delete file' action.

    This deleted both the html and pdf file. How do I delete ONLY the html file?


  • Suggested answer
    Phineas Profile Picture
    5,195 Super User 2025 Season 2 on at
    Delete HTML file from OneDrive Document Folder
    Yes, using 'Id' does work. I choose the wrong 'Id' the first time around.

    I needed to choose -
         outputs('Create_file')?['body/Id']

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 650 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 341 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard