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
Highlighted
Community Support
Community Support

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.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

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.
Highlighted
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

Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
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

Highlighted
Community Support
Community Support

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 Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,243)