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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / CreateFile "File alrea...
Power Automate
Unanswered

CreateFile "File already exists", when it does not

(1) ShareShare
ReportReport
Posted on by 15

Hi all,

 

Interesting one. I've got a flow that creates a document, however it is erroring out saying the file already exists, when it does not.

 

A file with the name [DIR]/[FILE].docx already exists. It was last modified by [MyUserAccount]. on [Time] -0700.

 

The file does NOT exist before the flow runs, and it is created properly in the Sharepoint directory. There is only one instance of CreateFile in the flow.

J_2_0-1720432104123.png

 

J_2_1-1720432104268.png

 

 

Has anyone else encountered this? Many thanks for any insight!

Full flow below:

 

J_2_6-1720432174505.png

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,479 Super User 2025 Season 2 on at

    @J_2 

     

    you are saying it doesnt exist. If true, then it means the file wont be in the environment + path because it failed.

     

    Is the file there? Please show the environment you are deving and running the flow in as well as the error itself.

     

    1. Make sure you aren't accidentally looking in the wrong place (happens to the best of us)

    2. Make sure to validate the environment and full path of the file, versus the Input ./ outputs of the CreateFile so that you can see them next to each other.

     

    If the flow says it exists, it exists.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • J_2 Profile Picture
    15 on at

    Unfortunately, in this case, the files did not already exist.

     

    The Folder of TrainingRecords/Records was completely empty prior to running the flow. After the flow ran, the file was created successfully in the expected directory. The modified time was "A few seconds ago", as in the screenclip above). 

     

    The issue was that it returned an error saying the file already existed, despite having just been created by the flow.

     

     

    To remove all scope for accidental duplication, the flow also appended the current time (down to the second) to the filename, which should have alleviated the issue of files already existing.

     

     

     

    In the end, I removed the "CreateFile" module, and re-added it with the exact same settings - And now its working absolutely fine. Was very strange....

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard