Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Create a separate file while saving attachments

(0) ShareShare
ReportReport
Posted on by 10

Hello,

 

I have created a flow which saves a file from a particular mail every day successfully to my share point folder. However, the file is always replaced by the new file ( since all the files coming from this mail have the same name). I want them to be saved with a new file name instead of replacing the old file. e.g. the file come is abc.xls. The flow should save the file which comes the next day by the name abc1.xls and then the next day abc2.xls and so on instead of replacing the first file.

 

Note: I have already disabled versioning.

 

can anybody help me!!!

  • v-jefferni Profile Picture
    on at
    Re: Create a separate file while saving attachments

    Hi @AbhijitP ,

     

    You can create the variable for date just follow the trigger, use it in the create file action file name input area. But the point is you have to use the recurrent trigger to fire the flow once a day, then use get emails action to retrieve the latest email:

    vjefferni_0-1643078052585.png

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • AbhijitP Profile Picture
    10 on at
    Re: Create a separate file while saving attachments

    I tried this too but it did not halo the file is still being overwritten.

  • AbhijitP Profile Picture
    10 on at
    Re: Create a separate file while saving attachments

    Where do I put the Initialise variable so that it would be helpful to me??

  • v-jefferni Profile Picture
    on at
    Re: Create a separate file while saving attachments

    Hi @AbhijitP ,

     

    Since you will have the file stored in SP folder everyday (one file for one day I guess), you can also create a variable to store current date as text and format as "yyyyMMdd" and append the date along with the file name, so you could conveniently find the file in other days.

    vjefferni_0-1642054473666.png

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • jdoss Profile Picture
    458 on at
    Re: Create a separate file while saving attachments

    In that create file function instead of putting attachments name, put whatever you would like, since it is always the same you can use the guid(), see image. If you want to get the filename you can use the compose and a function to get the filename and attach a guid to it.name.png

  • AbhijitP Profile Picture
    10 on at
    Re: Create a separate file while saving attachments

    8F26DBFE-6B6B-4056-A247-F81A9D07FA64.jpeg

  • jdoss Profile Picture
    458 on at
    Re: Create a separate file while saving attachments

    What happens in the condition? Are you saving the file somewhere or just getting the attachment? 

  • AbhijitP Profile Picture
    10 on at
    Re: Create a separate file while saving attachments

    0B91A018-D386-4C42-92B9-ECDD8C31B409.jpeg

  • jdoss Profile Picture
    458 on at
    Re: Create a separate file while saving attachments

    Well you can use the option I mentioned, or what I typically do is use the guid() function and create a unique code. Just get the file name while parsing and change it and add the guid to the file name. More specifically the substring(guid(), 0, 😎 with the last number being how long you want the id to be. Without seeing that part of your flow it's hard to help.

  • AbhijitP Profile Picture
    10 on at
    Re: Create a separate file while saving attachments

    As I have mentioned, my file comes from the outlook and overwrites the existing file as the attachment in the mail always has the same name. What option should I try so that the file is not overwritten and new file is created with another name. Like abc1.xls and so on.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,942 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow