web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving Email Attachmen...
Power Automate
Unanswered

Saving Email Attachment to different folders

(0) ShareShare
ReportReport
Posted on by 11

I have requirement to save the email attachment with different subject  to different folder in share point  

say i have 50 clients sending me email based on the subject i have to store there attachments to different folders i have list of clients where i am maintaining the path of folder where i am willing to store that document with 

but i am not able to save in respective folder if i have same client and i want to store attachments in multiple places 

i have created flow but  getting files save in all folder of that client and not able to match the subject and save based on the subject can anyone help with how to match the subject with that email and store to respective folder 

Screenshot 2024-04-18 182717.pngScreenshot 2024-04-18 183009.pngScreenshot 2024-04-18 183128.pngScreenshot 2024-04-18 183305.pngScreenshot 2024-04-18 183338.png

Condition to check subject is not working for me as i want to work , getting attachment saved in all folder which is matching the email id of client 

 

 

Categories:
  • Andrew_J Profile Picture
    1,962 Moderator on at

    @shivkanya_ 

     

    For clarity I belvie you get an email from a cleint that contains attachments, you want to save those attachments into a specific folder in a SharePoint Document Libary.  The details of the folder location are stored in a seperate SharePoint List.

     

    If this is the case then I think you need to be looking at a SWITCH and have a CASE per Email, then below that save the files to the folder you want to. 

     

    I am not going to spend time checking if the above works, in my view it seems to be a cleaner way to do this.  The only issue you will have is the number of CASES you are alowed on a SWITCH which is 50.  So if your SharePoint list gets to over 50 you will have to think of a different method

     

    Regards,

     

    Andrew

  • shivkanya_ Profile Picture
    11 on at

     yes that's exactly wht my problem statement is but I do have more than 50 clients so it wont be working with switch

    storing customer email and subject to an list is what i thought to work with if you have any better solution for my problem please suggest me.

  • Andrew_J Profile Picture
    1,962 Moderator on at

    @shivkanya_ 

     

    I am only thinking out aloud to put some ideas into the pot.

     

    You say have user1@domain.com, the domain is fixed but the domain may have user1 to user7.  User1 through user7 might have differing folders that their attachments need to go into.  Therfore could you not look at array in the flow as that is what comes back from your SharePoint List.  Then have a flow per domain.

     

    I am not sure how you would do this, just trying to give you someting to think about.

     

    Regards,

     

    Andrew

  • santi_95 Profile Picture
    77 on at

    @shivkanya_ 

     

    Since you have a SharePoint list with the paths and emails, have you tried doing a Get items and using a filter to only retrieve the items that match the sender to the email column?

     

    With this if you have multiple paths to the same client email you can loop through all of those saving your files. If there are any filter that need to match the subject you can use conditions as you loop through the paths.

     

    Hope that helps.

  • shivkanya_ Profile Picture
    11 on at

    @santi95 

    I guess i have done the same thing and now working fine for me thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard