I am attempting to write a flow to retrieve specific text from an email response. Then I want to store that response in an Excel table. I am currently blocked on retrieving the text.
My flow actions:
- When a new email arrives
- HTML to text
- EnterKey (Add newline delimiter)
- Split Body Text (split text into array of strings)
- Initialize a few variables...
- Compose (to find if my string is in the array element)
- contains(items('Split_Body_Text'), variables('varCommitted'))
- It is on step 6 where the flow fails. (This is just a test to see if it works. I plan to change this to Apply to each so I can loop through the array of strings.)
- I see that my input shows as false so that seems to be the problem. I sent an email with a single sentence and confirmed step 4 sees that array with one element.
- I'm not sure why this is false as the contains function should take the array of strings from step 4. I've checked to confirm, the collection can be string or array you want to search within. This can be a variable, dynamic content, or a literal value.
- This is the first area I'm looking for help with.

Ultimately I want to put this into an Apply_to_each and loop through the array of strings until I’ve found the first instance of the text I am searching for.
The condition is an AND:
- Function above except changing the input to be each element of the array from the Apply : contains(items('Apply_to_each'), variables('varCommitted'))
- varArray is not equal to zero
In the Yes path I have following actions:
- Update my varArray so it stores the position of the text found in the array.
- Can I do this and reference it later?
- Increment the counter so it'll stop processing the loop
Once I the loop is done processing, I plan to set some actions to:
- Find the email address from the subject line of the email
- Store email address from subject line of email in variable
- Open Excel file
- Filter the table by the email variable
- Update each row with the response in Committed variable
Does this overall flow process make sense? What suggestions changes would you make?
Thank you