Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Cannot create file since one already exists

(0) ShareShare
ReportReport
Posted on by 14

Hi

 

I have created a flow that send attachments to a specific Drive folder. It's triggered by a specific subject heading and all the attachments have exactly the same name. It works perfectly but when I set Outlook as the source instead of Gmail I get this error:

 

Cannot create file since a file with name '/Laps/Ranking.csv' already exists in the same folder.
clientRequestId: 30c75f90-426e-457a-820a-560cb0b48d5d

 

Changing the action from 'Create File' to 'Replace File' is not an option because I need all previous attachments to remain in place. As I said, this works from Gmail flawlessly - the flow creates the file in the folder without any issue, even if there are multiple files with the exact same name. Unfortunately, I can no longer use Gmail at work.

 

Any ideas about a solution?

 

  • nickas Profile Picture
    228 on at
    Re: Cannot create file since one already exists

    Could you show us how you made it?

  • Viet_Luu Profile Picture
    3 on at
    Re: Cannot create file since one already exists

    @Dan76 Can you show me the expression to add the timestamp cause I am having the same issue

  • Dan76 Profile Picture
    14 on at
    Re: Cannot create file since one already exists

    Hi, have found a workaround to the problem. I used an expression that adds a timestamp to the file. This made each one unique, which avoided the error. In my original post I said that I had to keep all the files exactly the same (or the script in Google Sheets that pulls the files in from Drive would not work.) I was wrong, the script still works with the timestamp on it.

     

    Nonetheless, having to add an expression to a simple create file action is an extra step that I don't think should be necessary. I had to get help with the expression, my skill set does not include programming!

  • Verified answer
    Rei0116 Profile Picture
    on at
    Re: Cannot create file since one already exists

    Hi, I think you should raise a support ticket and provide more details. 

  • VictorIvanidze Profile Picture
    12,214 on at
    Re: Cannot create file since one already exists

    Sorry I can't help here - it's a question to the Power Automate development stuff.

  • Dan76 Profile Picture
    14 on at
    Re: Cannot create file since one already exists

    As a test I deleted the Drive folder and ran the flow again. It failed with the same error message - 'cannot create file since a file with the same name already exists in the same folder'. How can there be a file in the folder with the same name if the folder is empty?

  • VictorIvanidze Profile Picture
    12,214 on at
    Re: Cannot create file since one already exists

    Hi @Dan76 , I mean to delete just before saving the file with the same name to avoid "file already exists" situation. 

  • Dan76 Profile Picture
    14 on at
    Re: Cannot create file since one already exists

    Dan76_0-1612004875343.pngDan76_1-1612004994221.png

    This is the configuration. If I set 'When a New Email Arrives" to Gmail, it works. If it's Outlook, it fails and gets the error I originally posted.

  • Dan76 Profile Picture
    14 on at
    Re: Cannot create file since one already exists

    Hi Victor, I need to keep all the files in place in the Drive folder. I have a script that imports the files into a spreadsheet and it will update the sheet based on what is in the Drive folder. So if files are deleted that data will be missing from the sheet.

     

    I'm not sure why the exact same flow works with Gmail but not with Outlook.

  • VictorIvanidze Profile Picture
    12,214 on at
    Re: Cannot create file since one already exists

    Hi @Dan76, you can check if the file is already exists and if so delete it.  

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow