cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jerry5209
Level: Powered On

How to save different email attachments in different folders

Hi, I use a flow that auto save email attachments in sharepoint and it work well.

And now I would like to save different attachments in different folders.

a. the email was a daily report

b. files were all excels

c. files name were "WoYield_xxxxxxxx.xlsx" and "WoDetail_xxxxxxxx.xlsx", the "xxxxxxxx"was yyyymmdd (it changed every day)

 

How to save "WoYield_xxxxxxxx.xlsx" in A foleder and save "WoDetail_xxxxxxxx.xlsx" in B folder when the daily report arrived?

I would like to keep the file name when saved in the folders.

 

Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to save different email attachments in different folders

Hi @Jerry5209 

 

Using split and first expression you can get the filename. Once the filename is extracted then add an if condition to check the filename. Use the SharePoint create file step to upload the email attachment.

 

Here is an example of split and first expression to get the filename.

 

Add a compose statement and copy the below expression. Replace the hardcoded filename to email attachment filename.

 

first(split('WoYield_xxxxxxxx.xlsx', '_'))
 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
Super User
Super User

Re: How to save different email attachments in different folders

Hi @Jerry5209 

 

Using split and first expression you can get the filename. Once the filename is extracted then add an if condition to check the filename. Use the SharePoint create file step to upload the email attachment.

 

Here is an example of split and first expression to get the filename.

 

Add a compose statement and copy the below expression. Replace the hardcoded filename to email attachment filename.

 

first(split('WoYield_xxxxxxxx.xlsx', '_'))
 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

Community Support Team
Community Support Team

Re: How to save different email attachments in different folders

 

Hi @Jerry5209 ,

 

You can use Condition to determine if Attachment Name begins with the specified string value and then save the file to the specified folder.

 

For different folders, you could add a parallel branch to save the file to folder A or B respectively.

Image reference:

150.PNG

 

Best Regards,

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.
Jerry5209
Level: Powered On

Re: How to save different email attachments in different folders

Hi Barry:

 

I tried Abm's solution and it works so I didn't try this solution, I think this one should be worked too, thank you very much.

 

Image 2.jpg

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 70 members 3,563 guests
Please welcome our newest community members: