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

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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,148)