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

Save attachments to different libraries based on Subject

Hi everyone, 

 

I want to create a Flow which saves the email attachment on a SPO site, and based on what the Subject contains I need it to be saved in different Libraries. There are at least 40 different libraries, (or 40 different views if that would be a better option), which I assume means that the number of conditions would a around a million. 


Could there be a smooth solution for this? 


I hope my question is somewhat understandable.. 

 

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Save attachments to different libraries based on Subject

Hi @Anonymous ,

 

Could you provide details of the Flow configuration?

Please need to pay attention to the configuration of the Expression in the Condition.

Please test according to your initial needs--Subject contains the corresponding Library Name.

 

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.
5 REPLIES 5
Community Support Team
Community Support Team

Re: Save attachments to different libraries based on Subject

Hi @Anonymous ,

 

Assuming that the Subject contains a Library Name and then stores the attachment in the corresponding Library according to the Name, please refer to the following method.

It is recommended that each Library Name have its own characteristics, otherwise it may lead to very fuzzy judgments.

 

  • Get all the Libraries using Get all lists and libraries action.
  • Use Condition to determine whether Subject contains the current Library Name and determine whether the current item is a Library. A Type value of 101 indicates that this is a Library.
  • If the condition is met, the attachment is added to the specified Library.

 

Image reference:26.PNG

 

27.PNG

 

Please take a try.

 

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.
Anonymous
Not applicable

Re: Save attachments to different libraries based on Subject

Hi, and thank you for your response! 

 

I've set up the Flow and tested it around ten times, but I keep getting False as expression result even though the library name/subject is the same and no attachment is saved on the SPO site. No errors during the Flow. For this test I sent an email containing a pdf named "hemligt.pdf". Tried both "Subject" and "Attachments name" in the condition. Any idea what I might have done wrong? 

 

getalllistsandlibraries.PNGapplytoeach.PNG

Community Support Team
Community Support Team

Re: Save attachments to different libraries based on Subject

Hi @Anonymous ,

 

Could you provide details of the Flow configuration?

Please need to pay attention to the configuration of the Expression in the Condition.

Please test according to your initial needs--Subject contains the corresponding Library Name.

 

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.
Anonymous
Not applicable

Re: Save attachments to different libraries based on Subject

Thanks for your quick reply! 

 

This is what it looks like as of now: 

 

exp.PNGifyes.PNG


Thanks, 

Linn

Community Support Team
Community Support Team

Re: Save attachments to different libraries based on Subject

Hi @Anonymous ,

 

Thank for your reply.

 

Please provide the Expression you are currently configuring.

It is recommended to use string(101) instead of String(101), which seems to have no effect, but please keep with me to facilitate troubleshooting.

In addition, if Subject is the same as Library DisplayName, consider using is equal to.

 

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.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us 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: 50 members 4,659 guests
Please welcome our newest community members: