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 / Rename email attachmen...
Power Automate
Unanswered

Rename email attachment with keeping file type

(0) ShareShare
ReportReport
Posted on by 6

Hi everyone, 

A scheduled cloud flow was created to automatically save emails attachments, however since my attachments have the same exact name and type but with different received times, I couldn’t keep the attachments file type when use the received time as a file name and when use the attachment name it will keep the file type but the flow will overwrite the file name and save only the latest email attachment at the end! Appreciate any advice on this one. Thank you 

Categories:
I have the same question (0)
  • Andrew_J Profile Picture
    1,962 Moderator on at

    @KamalSager 

     

    To clarify, irepective of the scheduled nature of your flow.  An email arrives with some attachments which you want to save ot a SharePoint Library.  The emails come in at various times of the day. 

     

    You want to save each one of the attachments with a unique name but keep its type like XLSX and DOCX.

     

    Can you please give me an example of the typical names.

     

    Regards,

     

    Andrew

  • KamalSager Profile Picture
    6 on at

    @Andrew_J 


    Report_2024_04_15.CSV

    Report_2024_04_16.CSV

     

    We receive this email everyday, each email has only one attachment with the same exact name. 

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @KamalSager 

     

    Then if you have files coming in of:

     

    Report_2024_04_15.CSV

    Report_2024_04_16.CSV

    Report_2024_04_17.CSV

    Report_2024_04_18.CSV

    Report_2024_04_19.CSV

    Report_2024_04_??.CSV

     

    Then why not use the following:

     

    https://www.youtube.com/watch?v=w_7cqWwgOW8

     

    The above is based on many number of attachments.  And I would not use a sheduled flow.  I would look at the email address the above reports come in from and some of the subject as per the above video.

     

    Regards,

     

    Andrew

  • KamalSager Profile Picture
    6 on at

    @Andrew_J 

    These are the output names that I need to get. The original files name are the same they all use the same name let's say

    report_abc

     

    I receive this email everyday with the same attachment ( same file name & type), only the content is different and need to save these attachments with new different names that reflects date of receiving the attachment. 

     

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @KamalSager 

     

    Then that you should look at the following:

    Andrew_J_0-1713214888279.png

     

    In the box above you shoukd use as an expression:

     

    formatdatetime(utcnow(), 'yyyy_MM_dd')

     

    The have something like as follows:

     

    Andrew_J_1-1713215147572.png

     

    Add the rest of the dynamic linking in the above as you need.

     

    Regards,

     

    Andrew

  • KamalSager Profile Picture
    6 on at

    Thank you @Andrew_J instead of using an expression I did use the attachment received time plus .CSV

    and now I got the attachments with their file type as well. The concern was in keeping the file type without the need of adding the file extension .CSV!!

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @KamalSager 

     

    So is this resolved then, if so can you please make this as solved.

     

    Andrew

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard