Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 4 Feb 2025 21:22:56 by 10
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
    10 on 24 Feb 2025 at 12:23:17
    Check an email for the presence of one the keywords in an array
    Thank you Tom for your help !
     
  • trice602 Profile Picture
    13,723 Super User 2025 Season 1 on 24 Feb 2025 at 00:12:35
    Check an email for the presence of one the keywords in an array
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    13,723 Super User 2025 Season 1 on 24 Feb 2025 at 00:12:05
    Check an email for the presence of one the keywords in an array
    Hey there!
     
    I am following up on this post check an email for the presence of one the keywords in an array in this category building flows from 02/04/2025.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 3 replies and 0 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • OZ-04022105-0 Profile Picture
    10 on 05 Feb 2025 at 12:12:37
    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
    10 on 05 Feb 2025 at 12:11:04
    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 ?
  • Verified answer
    trice602 Profile Picture
    13,723 Super User 2025 Season 1 on 05 Feb 2025 at 00:29:16
    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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,369 Most Valuable Professional

Leaderboard
Loading started