web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue with apply to ea...
Power Automate
Unanswered

Issue with apply to each steps not detecting keywords resulting in wrong condition evaluation

(0) ShareShare
ReportReport
Posted on by 28
Hello Friends,
 
I was wondering if someone could help me with a flow issue.
 
I have a flow that automates detection of keywords from uploaded files (using AI builder( & flag them in a SharePoint Document library
 
This is what the flow does in a nutshell :
 
  • Users submit  Students Profile documents in SharePoint
  • Upon upload, an automated process (Used the text recognition prebuilt model in Power Automate )scans the document for keywords/phrases stored in the SharePoint list "Keyword Identifier."
  • If any keyword is found, the document is flagged in the SharePoint library Students Profile with:
    • "Keyword Identified" (Yes/No)
    • "Keyword " (list of matched keywords)
    • “Keyword Check Flag” (Yes/No)
  • The process runs every time a document is uploaded.
  • Coverting the keywords and pdf content to lower case to avoid case insensitivity,
The issue I have is 1) It needs to match exact keyword  whatever i do expression returns false.
 
  • Get Items (from SharePoint list) — Get the list of keywords.


  •  

    Apply to Each (loop through the keywords):

     

    •  

      Condition (Check if DocumentContent contains Keyword):

       

      •  

        contains(trim(toLower(variables('DocumentContent'))), trim(toLower(item()?['Keywords'])))







      •  
      •  
      •  
      •  
      •  






    •  
    •  
    •  
    •  
    •  

  •  

    If true, set a flag (or log the match).

  • Please suggest what mistake im doing here and also if any alternative option to do this. Library has huge document inflow with more than 5000 a day in a week.

  •  

  •  

  •  

  •  

  • #AI #Powerautomate#PDF scan

Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Have you confirmed that Document Content and Keywords are being populated?
    I don't see how a recommendation can be made without you showing the flow or narrowing down the failure point.
     
  • RadSan123 Profile Picture
    28 on at
    Hi @ronald,
     
    Thanks for your inputs. I have updated my post with the screenshot of "Apply to each" loop from the flow run history. Kindly advice

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard