Announcements
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:
The flow:
Thank you so much in advance 😇
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.
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])
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].
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])
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Mohsin Ali 299
11manish 274 Super User 2026 Season 2
Henil 119