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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Specific filename from...
Power Automate
Unanswered

Specific filename from outlook attachment

(0) ShareShare
ReportReport
Posted on by

Hi there all,

 

I attached a screenshot of the entire flow below.

 

I want to create a step where the outlook attachment saves as [Names ONLY of the RECIPIENTS]_[YYYY-MMM-DD_HH:MM]. Instead of the following:

angelo_hr_0-1673044107906.png

 

The flow:

angelo_hr_1-1673044141499.png

angelo_hr_2-1673044182638.png

 

Thank you so much in advance 😇

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Hi @angelo_hr,

    it looks you have to export  the message (use "Export email (V2)" action) to get the display name of the recipient and after that create the file name.

  • Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @angelo_hr,

     

    You could use a concat function and a formatdatetime in an expression to apply this format. I also use a split function to retrieve the file extension from the Name field. 

     

    Below is an example

     

    concat(triggerOutputs()?['body/toRecipients'], '_', formatdatetime(triggerOutputs()?['body/receivedDateTime'], 'yyyy-MMM-dd_HH:mm'), '.', split(outputs('Get_Attachment_(V2)')?['body/name'], '.')[1])

     

    concat_to_receivedtime.png

  • VictorIvanidze Profile Picture
    13,083 on at

    Hi @Expiscornovus,

    they wants this:

    >I want to create a step where the outlook attachment saves as [Name ONLY of the recipient]_[YYYY-MMM-DD_HH:MM]. 

  • Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @VictorIvanidze,

     

    I missed that part of the requirements. Thanks for the correction.

     

    In that case you might try this:

    concat(split(triggerOutputs()?['body/toRecipients'], '@')[0], '_', formatdatetime(triggerOutputs()?['body/receivedDateTime'], 'yyyy-MMM-dd_HH:mm'), '.', split(outputs('Get_Attachment_(V2)')?['body/name'], '.')[1])

     

  • VictorIvanidze Profile Picture
    13,083 on at

    Well unfortunately 

    toRecipients

    contains only SMTP addresses but not the display names. You have to export the email and parse the headers to get the display name.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard