A variable V1 with values set to learning, skills, development and many more key words. When a row is added in to entity, if the title or else description, where the description value may be null sometime. If any of the keywords which are present in the variable V1 irrespective of case sensitivity. Want update the column description in entity as true.
{"id":"321e053c-7e66-4cdb-83d9-fb1b7547eb0d","brandColor":"#8C3900","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-b959cb53-5ecb-4b41-805f-06e7795a0bd2"}}},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Scope_search_for_key_words","operationDefinition":{"type":"Scope","actions":{"Compose_key_words":{"type":"Compose","inputs":["learning","skills","development"],"runAfter":{}},"Compose_sample_text":{"type":"Compose","inputs":"This is a sample text to find key words like learning or so","runAfter":{"Compose_key_words":["Succeeded"]}},"Filter_key_words":{"type":"Query","inputs":{"from":"@outputs('Compose_key_words')","where":"@contains(toLower(outputs('Compose_sample_text')), item())"},"runAfter":{"Compose_sample_text":["Succeeded"]},"description":"toLower(outputs('Compose_sample_text'))"},"Compose_key_word_found":{"type":"Compose","inputs":"@if(equals(length(body('Filter_key_words')), 0), false, true)","runAfter":{"Filter_key_words":["Succeeded"]},"description":"if(equals(length(body('Filter_key_words')), 0), false, true)"}},"runAfter":{}}}
Of course you won't need the first 2 actions because one is the trigger where you receive the text and the other should be a global variable you use in filter array. The last action is just to show if the key word is found or not. Depending on your usecase this could be an update action or a condition or whatever.
Hi @AkshayJJ2,
Obviously, none can work as your input isn't a keyword, but a string that may contain a keyword.
Try this design:
Expression:
This flow splits the input by space to create an array of words, splits keywords variable by coma to create an array of keywords. It makes an intersection of both arrays to create an array of all common items. If resulting array's length is greater than 0, that means both arrays contain one or more common items.
[Edit] for debugging purpose, you can split the expression. Set this part of the expression in a compose before condition:
intersection(split(toLower(variables('Keywords')), ','),split(toLower(outputs('Input')), ' '))
and this one in condition:
length(outputs('Compose'))
That way if it fails, you'll be able to see what intersection returns according to your inputs.
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Hello @Matthy79,
Could you please elaborate with an example demo?
Loops are critical in Power Automate and should be avoided if possible. For this use case I would suggest to use filter array. You can store your key words in a global variable. That way you can save another action in the trigger flow and you can change the key words any time without deploying.
After filter array (contains(toLower(concat(string1, ‘|’, string2)), item()) you can check the length.
What is the datatype of your variable? Are you storing them in an array or just a coma separated string?
I agree with @SamLed's approach. But if it isn't working out for you you can also store your tags in an array variable.
For Example:
[
"learning",
"skills",
"development"
]
Then loop through each index using Do Until Loop (Learn how to apply do Until Loop).
Use a condition inside the loop and reference the current index and use the contains operator.
You can apply your logic in the True section of the condition.
Note: try to use toLower() on both values in the condition for better case handling.
Let me know if this works for you.
Hi @SamLed,
thank you for the response. I tried both the flow designs, Unfortunately both are not working.
The Data source is data verse and the entity is account. If the account title has any of the keywords mentioned in the variable it must give true value with performance efficiency (trying to avoid for each loop).
Now in example: my title has learn keyword and the variable has learn keyword, but still it is giving false as result.
Hi @AkshayJJ2,
As I'm not sure about what row/entity source (Excel, SharePoint, Dataverse, ...) you are talking about, just giving you how to check matching of an input against keywords in a case insensitive way.
First flow design (String contains):
Condition left operand: toLower(variables('Keywords'))
Condition right operand: trim(toLower(outputs('Input')))
Operator: Contains
Note:
Second flow design (Array contains):
Condition left operand: if(contains(split(toLower(variables('Keywords')), ','), trim(toLower(outputs('Input')))), true, false)
Condition right operand: true
Operator: Is equals to
Note:
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Michael E. Gernaey
8
Super User 2025 Season 1
David_MA
8
Super User 2025 Season 1
ankit_singhal
7
Super User 2025 Season 1