Desert Spider
Desert Spider

Reputation: 778

save outlook attachments with different names using power automate

I have a template I have been using with great success in power automate flows.

enter image description here

my apply to each segment is as follows

enter image description here

this saves the file like...

enter image description here

my issue is I do not want the '_2023-03-09-0103' to show up in the sharepoint loaded attachment. I have tried multiple online references using split, and trigger and cannot figure out how to make the name of the SharePoint file 'OrigamiUserList.xlsx'. I know it lives in the ShrePoint - CreateFile - FileName field, I just cannot figure out the correct syntax to make it work. When I replace the provided 'Attachments Name' option with 'OrigamiUserList' the program uploads a blank page with the name but not in excel format and with no data. Thank you in advance

Upvotes: 0

Views: 755

Answers (1)

Skin
Skin

Reputation: 11262

A split function should do it for you. I'm running a little blind here and can't reproduce your exact requirement but this shows how it can be done ...

Flow

Flow

The expression in the second step is ...

concat(split(variables('File Name'), '_')[0], '.xlsx')

Obviously, that could be improved given I am implying the extension but if it's always .xlsx then it will always work.

Result

Result

Upvotes: 0

Related Questions