Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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

  • RadSan123 Profile Picture
    28 on at
    Issue with apply to each steps not detecting keywords resulting in wrong condition evaluation
    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
  • ronaldwalcott Profile Picture
    1,988 on at
    Issue with apply to each steps not detecting keywords resulting in wrong condition evaluation
    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.
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,683 Most Valuable Professional

Leaderboard