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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,539)