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,
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:
In this example I selected the Has Attachment property to be shown:
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
Hi. Does this flow run automatically? I notice it didnt catch today's email. It worked when i test it yesterday.
thank you so much for the detail walkthrough. It works flawlessly.
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:
(3) Click Add to add a trigger condition:
(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'))
Here is the same expression displayed for easy reading. Change the subject text to match your requirements:
You could also add other trigger conditions as needed, for example FROM:
@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:
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):
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
Michael E. Gernaey
179
Super User 2025 Season 1
David_MA
161
Super User 2025 Season 1
stampcoin
143