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
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.
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:
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