Office365 Send Email - Attachments names

Hi All.

I have a question regarding the way the attachments are named, when sending an email using MicrosoftOffice365 Send Mail.

I want to send an excel file and the name of the file in the attachment is the entire path, like “C:\Temp\test.xlsx”. Any idea on how to remove so it shows only “test.xlsx”? Basically I would like to see the attachment the same way I see it when I use Send Outlook Mail Message.

I assume this has something to do with the way Microsoft365 uploads the files when sending the email, but maybe there is a solution?

Thank you.

Hello @TheArchitect
Try this expression to get the file name with extension



Thanks Gokul.

But my question was a bit different. Let me try to explain in detail.
I use Microsoft Office 365 Scope, I assign the attachment to a string variable and then use the variable in Send Mail, as below

This is the result:

What I want is that the email that is received, to have the attachment named “Test2.xlsx”, not “C:\Temp\Test2.xlsx”. I could get what I want by using Send Outlook Mail Message but I am restricted to using Microsoft Office 365 Activities.