i have 2 automatic email with the same name
- Pricelist 123456 Has Been Published
- Pricelist 123456 has been published
i only want to trigger the flow whenever there is an email with the first email subject name received in inbox (Has Been Updated)
if i write 'Pricelist' it will take both email
how to write it in subject filter for When a new email arrives (V3) action in Power Automate flow ?
@creativeopinion Thank you for your kind reply, it solve my problem, but im still not using lower because im intended to only get string subject with 'Has Been Published', thank you
@azid If you only want to trigger when there is a subject email that contains Has Been Published (note you had a spelling error above), as @VictorIvanidze mentioned below, use the contains() operator.
However, as mentioned in my video—you still need to convert the subject line to lowercase to avoid any case sensitivity issues.
For example, I used this trigger condition:
@contains(triggerOutputs()?['body/subject'], 'Has Been Published')
The subject line is left as is and the string is: Has Been Published
However, the flow only triggered on the fourth try when the subject line text matched the string in the trigger condition.
For that reason, you need to convert the subject line to lower case AND the string should be in lower case.
@contains(toLower(triggerOutputs()?['body/subject']), 'has been published')
The flow triggers no matter what case the subject line text string (you're looking for) is in.
Use contains() function.
@creativeopinioni have watched your videos, but i still didnt get the desired outcome
the only difference is uper case and lowercase if im ussing lowercase expresion, it will makes the 2 subject email bacome the same whic is not the desired outcome, i only want to trigger when there is a subject email that contains string 'Has Been Pulished' not the other
@azid In that case you can check the subject to see if it starts with 'pricelist' and ends with 'has been published'. I'd recommend converting the subject line to lower case to prevent any case sensitivity issues. You can refer to this section of my tutorial I linked above to see a demo of using the toLower() function.
hi @creativeopinion , thank you for your answer, but the number will be different each time there is a new email arrived, 'Pricelist ....... Has Been Published'
so its not exact match like in the example
@azid When using the When a new email arrives (V3) trigger (or any automated trigger) for your flow, it's always best practice to use Trigger Conditions.
I've linked a tutorial below on how to add trigger conditions to your flow. If you want to only trigger your flow for when an email with this exact subject line is received: Pricelist 123456 Has Been Published
Ensure you are using the is equal to operator. It will look for an exact match. Keep in mind it is case sensitive. However, if you want to ensure your flow will trigger for both these subject lines:
You'll need to convert your subject line to lower case. I cover how to do that in this tutorial.
4 Ways You Can Use Trigger Conditions in Your Microsoft Power Automate Flow
If you are using an Automated Cloud flow trigger in your flow—you need to consider adding trigger conditions.
Do YOU 🫵 know what a trigger condition is? Trigger conditions can be set in most flow triggers. These conditions you set must be true for the trigger to fire. In this Power Automate tutorial, I’m going to show you how to use trigger conditions in your flows to control when your Power Automate flows trigger.
If your plan has flow run limits—you can avoid triggering your flows unnecessarily by using trigger conditions.
I’ll cover four different flow examples that would benefit from trigger conditions:
⚡️ Triggering a flow when a column is changed to a specific value
⚡️ Triggering a Flow When an Event Updated or Deleted
⚡️ Triggering a Flow When a New Folder is Created
⚡️ Triggering a Flow When a Specific Email is Received I’ll also show you a trick on how to easily create the expressions needed and give you a few tips on how to troubleshoot your flow.
IN THIS VIDEO:
âś… Four different flows that would benefit from trigger conditions
âś… What is a trigger condition?
âś… How to add a trigger condition to your flow
âś… How to trigger a flow when a column is changed to a specific value
âś… How to trigger a flow when an event is updated or Deleted
âś… How to trigger a flow when a new folder is created
âś… How to trigger a flow when a specific email is received
âś… How to troubleshoot a trigger condition
âś… How to prevent case sensitivity issues with a trigger condition
âś… How to use the filter array action to easily compose an expression that can be used in a trigger condition
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional