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 / Delete HTML file from ...
Power Automate
Unanswered

Delete HTML file from OneDrive Document Folder

(0) ShareShare
ReportReport
Posted on by 5,323 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 -
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 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,323 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,323 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,323 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

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