cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DryBSMT
Frequent Visitor

Creating a Dropbox folder based on content of a filename extracted from an email

Today is my first day using flows so I am a real newbie here.

 

I have built a flow that will copy attachments from emails and save them into a specific folder in Dropbox.  When I first set it up, the default folder was /attachments and it created the folder and put the files into it, so I know that inserting a non-existing name in the path will result in a new folder being created.  I have been able to enter my own path combined with dynamic content 'Attachment Name' and it works but includes the extension in the folder name).  I would like it take it a step further and use the filename, without the extension, to create the folder (eg. /Work Orders/Locates/Attachment Name/. 

 

I am trying to build the save path with a combination of text, dynamic content and expressions. 

 

I started with the replace() expression and then clicked on dynamic content to insert the attachment name but 'Attachment Name' is no longer an available option to use in the expression.  I was hoping to use the replace expression to remove the .pdf from the name.

 

Any ideas on how I can do this?

 

1 REPLY 1
DryBSMT
Frequent Visitor

For some reason, Attachment Name and Attachments are the same thing, they both reference body/attachments.

 

I have used Compose in an Apply for each and created the following expression 

split(string(triggerOutputs()?['body/attachments']),'.')[1]

The purpose is to strip of the file extension.  What I am getting as output is:  type":"#microsoft and the folder that gets created is name the same.

 

Help Please.

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!

Top Solution Authors
Users online (3,500)