Hi! Please help me figure out how the condition works in Power Automate flow.
I use a connector: When a new email arrives in a shared mailbox, insert a row in Excel Online Business spreadsheet based on a specific condition else insert a row in other spreadsheet based on other condition.
Task: Check the subject of the received email for the presence of keywords, fulfill the If/then/else condition, depending on the result of the check.
Condition: Does the subject of the email contain the words "defective goods"? If yes, then write the line "defective goods" to the excel file, if not, check condition 2.
Condition 2 - does the subject of the email contain the word "size"? If yes, then write the line "size" to the excel file, if not, check condition 3.
Condition 3 - does the subject of the email contain the word "return"? If yes, write the line "return" to the excel file, if not, write the line "other" to the excel file.For some reason, in all cases, I have only the last condition on the path "no", i.e. the entry of the string "other". Emails arrive with different topics, but one condition is always met with the result of writing the line "other". What am I doing wrong?
I tried to put keywords in double quotes "" and removed the extra condition through AND - but it didn't help.
It also confuses me that inside the Subject element of Dynamic content there is an expression
triggerOutputs()?['body/subject']
Why are there words both body and subject?
The same thing is in the Split expression, which I use to capture individual words from the subject of the letter.
The scheme of conditions from Power Automate flow and other pictures in the attachment.


Split - expression
Subject - Dynamic content