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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to setup Flow to d...
Power Automate
Unanswered

How to setup Flow to download attachment from Outlook from one sender with 3 different email files

(0) ShareShare
ReportReport
Posted on by

Hello gurus,

 

I am hoping you can assist me with this flow setup.

 

I received 3 daily emails with attachments from the same email address via Outlook. Each email has its own email subject, but its the same every day. The only difference is the file attached. How do i set up a flow that can differentiate those 3 emails and download and save the file and replace the previous days file?

 

I have a flow that does similar things but is for one condition. Example:  Received email from send X, condition contains "XXXX", If yes add action, if no, add action.  But there are 3 conditions and that is where i am stuck. Not sure how to add multiple conditions or do i have to make a flow for each type?

 

thank you,

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Hi @punksterz626 ,

     

    You could try a trigger condition. The flow will only run if the trigger conditions are met. In your case you can test for the three different subject lines.

     

    Here is an example.

     

    (1) Click the ellipsis (the three dots), (2) then select Settings:

    Snag_570e740.png

    (3) Click Add to add a trigger condition:

    ekarim2020_1-1687300468091.png

     

    (4) Copy the following expression to the trigger condition:

     

    @or(equals(triggerOutputs()?['body/subject'],'Subject 1'), equals(triggerOutputs()?['body/subject'],'Subject 2'), equals(triggerOutputs()?['body/subject'],'Subject 3'))

     

     

    ekarim2020_2-1687300560694.png

     

    Here is the same expression displayed for easy reading. Change the subject text to match your requirements:

    Snag_56d0105.png

    You could also add other trigger conditions as needed, for example FROM:

    Snag_57cb0b5.png

     

    @equals(triggerOutputs()?['body/from'],'ellis.karim@365.com')

     

     

    Now the flow will only trigger if all of the conditions are met.

     

    Finally, you can use the Switch action to take different actions depending on the text of the subject line:

    ekarim2020_0-1687339313487.png

     

    The default can be used to handle the condition where there is no match in any of the Case conditions (i.e. this will handle Subject 3 in our example):

     

    Snag_7b43253.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • punksterz626 Profile Picture
    on at

    thank you so much for the detail walkthrough. It works flawlessly. 

  • punksterz626 Profile Picture
    on at

    Hi. Does this flow run automatically? I notice it didnt catch today's email. It worked when i test it yesterday. 

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Yes, the flow will run automatically.  Check your trigger conditions if you are not used to using trigger conditions.

     

    I would suggest:

     

    (1) Get the flow working first without trigger conditions. That way you can view the properties of each actions after runtime (e.g.. you view the values for the FROM property and the Subject Line  property). You can check if conditions are affected by uppercase or lowercase text in the subject line etc).  Let the flow run for a few days, ensuring that the flow has run a number of times to ensure that it is working reliably.

     

    (2) Refine the flow to use trigger conditions (but this is optional). Trigger conditions ensure that the flow only triggers if the conditions are met, but can make the initial fault finding process more difficult (e.g. why didn't the flow trigger?).

     

    For either case (1) or (2) above,  you can view the values of the From and Subject line after run time by selecting these column to be displayed in the runtime history:

    ekarim2020_1-1687533142678.png

     

     

    ekarim2020_3-1687533251244.png

     

    ekarim2020_2-1687533213427.png

     

    ekarim2020_4-1687533468942.png

     

    In this example I selected the Has Attachment property to be shown:

    Snag_69c85a5.png

     

    Hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard