How do I extract email content based on if either keywords are in the email? Sample email format (Html to text output) below and the text I want extracted is "My PC > Documents > BC > 2025".
First keyword is "My PC". Text pulled starting there and ending before the first "[" after "My PC".
Say the other keyword is "KW2". Email format is the same and the extracted text sample could be "KW2 > Other Docs > Other Folder > 2020".
The code I attached has been returning False every time, even when either keywords are in the email content.
email sample
[ourwebsite/images/logo.123456.321]
- - - - - - - - - - - - - -
Boss R,
I saved the files in my PC.
My PC > Documents > BC > 2025
[seeee notes jsklajskaljsakl]
Me
or(
if(contains(outputs('Html_to_text'), 'My PC'),
substring(
outputs('Html_to_text'),
indexOf(outputs('Html_to_text'), 'My PC'),
sub(
indexOf(outputs('Html_to_text'), '[', indexOf(outputs('Html_to_text'), 'My PC')),
indexOf(outputs('Html_to_text'), 'My PC')
)
),
false
),
if(contains(outputs('Html_to_text'), 'KW2'),
substring(
outputs('Html_to_text'),
indexOf(outputs('Html_to_text'), 'KW2'),
sub(
indexOf(outputs('Html_to_text'), '[', indexOf(outputs('Html_to_text'), 'KW2')),
indexOf(outputs('Html_to_text'), 'KW2')
)
),
false
)
)

Report
All responses (
Answers (