Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Attachments from Shared E-mail to CUSTOM folders

(0) ShareShare
ReportReport
Posted on by 18

Hi, 

 

I am curious if this is possible - I'm trying to create a flow where an e-mail to shared e-mail address uploads the e-mail along with the attachments (separately; e.g. 1 e-mail, 2 attachments; 3 total uploads to SharePoint) to be stored in a folder tagged by the subject. And a condition if that folder exists then to use that folder however if no folder exists then create it first. 

 

Example 1: 
E-mail Subject: REQ001

Attachments: 2 PDFs

 

Let's say we have a REQ001 folder already created in SharePoint Document Library, then the flow uploads 2 PDFs PLUS the actual e-mail for record retention. 

 

Example 2:

E-mail Subject: REQ002

Attachments: 2 PDFs

 

In this case we do not have a REQ002 folder in SharePoint Document Library so the flow creates the folder and puts the attachments in it. 

 

Is this doable? THANK YOU SO MUCH!

  • FZK Profile Picture
    18 on at
    Re: Attachments from Shared E-mail to CUSTOM folders

    Thank you, VK - I am trying to follow but have trouble here:

    1) got an error at this one saying invalid expression: replace(variables('val2'),items('remove_unwanted_character'),")

    EDIT: I think I figured it out by removing the " at the end? Is that Ok.

    2) What do I put for these Inc Val and List Folder (Is it just the site name and folder where I want these? Can you expand please. 

    3) When I select 'Name' for condition it's asking for output, would it be 'body'? It autopopulated.

    FZK_0-1671740361398.png

     

    Capture12.PNG

    Capture11.PNG

  • Kabilesh Profile Picture
    177 on at
    Re: Attachments from Shared E-mail to CUSTOM folders

    Hi @FZK 

     

    The below flow has been created according to your needs. Hopw this helps for you.

     

    Kabilesh_0-1671731921151.png

     

    Kabilesh_1-1671731945253.png

     

    Kabilesh_2-1671731958183.png

     

    Kabilesh_3-1671731971229.png

     

    Kabilesh_4-1671731992015.png

     

    Kabilesh_5-1671732006396.png

     

    Best Regards,

    VK

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow