cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create SharePoint list item from attachment, removing file extension

Hi,

 

I've created a flow to create a SharePoint list item when an email arrives. I would like the title field to be the attachment filename without the extension.

 

I've searched but been unable to find the right code to strip the extension from the file name.

 

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @Anonymous,

 

You could get the name without extension of the attachment by using the function provided by Expression.

Formula reference:

 

replace(items('Apply_to_each')['Name'],concat('.',last(split(items('Apply_to_each')['Name'],'.'))),'')

Flow configuration:

17.PNG

Output result:

18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

Hi @Anonymous,

 

You could get the name without extension of the attachment by using the function provided by Expression.

Formula reference:

 

replace(items('Apply_to_each')['Name'],concat('.',last(split(items('Apply_to_each')['Name'],'.'))),'')

Flow configuration:

17.PNG

Output result:

18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi - that worked great. Apologies for the delay in coming back to you - the reply notification ended up in my spam folder.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,508)