Forum Discussion

KatrienVds's avatar
KatrienVds
Copper Contributor
May 05, 2021

Find out in which language a form was submitted

Hello Community

 

I've set up a Microsoft Forms in mutiple languages, so my user can choose the language in which he or she wishes to fill it out. After that, I want to automatically reach out to them with an email when they're done filling out the form. For that, I made a Microsoft Flow.

Considering that my form is available in multiple languages is there a parameter that tells me in which language my user chose to fill out the form? So I can send them their mail in the correct language? 

Thanks in advance! 

  • ootb20229's avatar
    ootb20229
    Copper Contributor

    that information is stored in a Language field in the Excel Workbook in which MS Forms syncs the data, so to retrieve that information with Power Automate
    >use the Excel (Business) "Run script from Sharepoint library" action, with an Office Script that forces a refresh of all connections (use the automation recorder to generate the script); this forces the workbook to include the latest submission
    >then use Excel (Business)"Get a row" to get the row with the ID from the submitted form 

  • ootb20229's avatar
    ootb20229
    Copper Contributor

    you can retrieve that information from the Excel the form is synced with, the Language field contains the value that the user selected in the dropdown of the multilingual interface

  • OmarOsman10's avatar
    OmarOsman10
    Copper Contributor
    Hello, I am also trying to find a solution to achieve this, there is a default template in MS Forms to send an custom automated email notification to the person who filled out the form in English. I am also having issues, trying to detect which language the user select in the multilingual form and then based on the language chosen translate the field names and their responses into French and send it in an automated email. Did you ever find a solution, if so how would I go about achieving this, do you create 2 variables, one called FlagEnglish, String and FlagFrench, String and create a condition if FlagEnglish is equal to "English" then send form responser English automated email notification, if no then send from responser French automated email notification? Thanks.
    • KatrienVds's avatar
      KatrienVds
      Copper Contributor
      Hi Omar
      No the issue still stands.
      As a workaround I added an option field in the form to which the customer had to choose their preferred language of communication. That way I could use a case to send out mails in the correct language.
      • OmarOsman10's avatar
        OmarOsman10
        Copper Contributor
        Hi KatrienVds,

        You can use the following component in Power Automate: Select + New step > AI Builder, and then select Detect the language being used in text in the list of actions. From here you can use the dynamic content pop-up and enter the first field of your form. Then use an apply to each and in the box "Select an output from previous steps enter "results" in here. Then create a condition where there are two, first condition Responders email is not equal to "anonymous" && (And) Language (AI builder) is equal to "en" (for example English), then if yes, create a new step "Send an email (V2) and within the body of this email enter your email template and insert all the fields that correspond to your MS Form as you like. If no, then create several conditions to translate the text. For example: If "MS form field" is equal to the first option in the MS form question, if yes then you'll need to create a string variable for the question and in this step you'll want set the variable to the corresponding language you prefer if no "add no steps", after that you just repeat this process and at the end you'll want to add new step -> send an email and create your email template and insert all corresponding fields from your form using dynamic content. But for the responses you want translated make sure you insert the string variable instead of the form field.

Resources