So I have created this flow that automatically creates a Planner task, including attachments, from emails sent to a specific mailbox, I followed this guide https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Create-Planner-Task-and-Include-At...
I got everything working but now I'm trying to filter emails so that a task is not created if the email comes from a specific email address. My flow looks like this
I tried to add a condition after the "When a new email arrives" action but I got an error with my variable step saying that the variable can only be part of the main flow and not a condition. The I thought about using a filter array but didn't have much success with that because well, I'm not really familiar with how that works as far as putting the array function together.
Any help would be greatly appreciated! Thank you
Hi @moraleseder,
You could use a trigger condition for this and check the value of the from field.
Below is an example of that approach.
Add the following expression to the settings of your when an new email arrives trigger action.
Replace the email@contoso.com value by the e-mail address you want to exclude.
@not(equals(triggerOutputs()?['body/from'], 'email@contoso.com'))
Can I add multiple emails?
Hi @moraleseder,
Yes, sure. You can add an or function to the expression.
not(or(equals(triggerOutputs()?['body/from'], 'email@contoso.com'), equals(triggerOutputs()?['body/from'], 'email2@contoso.com'))
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.