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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Microsoft Flow Cogniti...
Power Automate
Unanswered

Microsoft Flow Cognitive Services Detect Language

(0) ShareShare
ReportReport
Posted on by

The Cognitive Services Detect Language action in Microsoft Flow returns a list of "detectedlanguages" - how can I only get the languagecode with the highest confidence score? Microsoft Flow automatically applies a foreach when using the "detectedlanguages" list but how do I filter it now?

 

Kind regards,

 

Joris

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Joris,

     

    I have created a flow to create an item in SharePoint list if the Language Code of an email is equal to “zh-CHS”. This flow works well for me. My flow screenshot for a reference:

    language.PNG

     

    But I didn’t get the “apply to each”, how is your flow configured? Could you provide a screenshot for better understanding?

     

    Best regards,
    Mabel Mao

  • patrickabel Profile Picture
    53 on at

    I'm curious about this as well. It looks like MS Cognitive Services returns an object array of "detected languages" which has values for name, code, and confidence score.

     

    If you try to use just one of these properties (i.e. Language Code) in subsequent steps, Flow/Logic Apps will auto-generate a for-each loop to ensure you first iterate the "detected languages" array.

     

    This is fine, but I don't any current functions in logic apps that would allow me to build a string or an array such that I could do something with this data before storing.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard