Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Check an email for the presence of one the keywords in an array

(0) ShareShare
ReportReport
Posted on by 6
Hi, 
 
I would like to accomplish more or less the same...
 
I would like to check every incoming mail for a few keywords. This list should be easy to change so I put it in an array.
Then if no keyword is found, the mail is not touched.
If one of the keywords is found in the subject or body or in part of the name of the attachement I check wether the mail has an attachement yes or no.
If there is no attachment the mail should be moved to the folder 'without keyword, to check'
If there is an attachment the mail is sent to an external email-address but should also be moved to the folder 'with keyword, sent'.
 
But I can't get it right to detect the keywords

I created this flow:
 
 
This is how I populate the array:

Then the condition:
 
Does anyknow know what I am doing wrong ?
 
Thank you for any help !
  • OZ-04022105-0 Profile Picture
    OZ-04022105-0 6 on at
    Check an email for the presence of one the keywords in an array
    The code view of the html convert looks like this now:
     
    {
    "type": "OpenApiConnection",
    "inputs": {
    "parameters": {
    "Content": "<p class=\"editor-paragraph\">@{triggerOutputs()?['body/body']}</p>"
    },
    "host": {
    "apiId": "/providers/Microsoft.PowerApps/apis/shared_conversionservice",
    "connection": "shared_conversionservice-1",
    "operationId": "HtmlToText"
    }
    },
    "runAfter": {}
    }
  • OZ-04022105-0 Profile Picture
    OZ-04022105-0 6 on at
    Check an email for the presence of one the keywords in an array
    Ok thank you !
     
    What do I put as content for the Html to Text converter ?
     
    I can put dynamic content /Body in there.. But how do I let it look in the subject as well and in the name of the attachment ?
  • Suggested answer
    trice602 Profile Picture
    trice602 11,657 on at
    Check an email for the presence of one the keywords in an array

    Hi,

    After your trigger add the action html to text.  That will turn your html into words and you can continue with 100% success because the rest of your flow looks great!

     

     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard