expressionpower-automatesurveymonkey

Is there a way to write an Expression in Power Automate to retrieve item from SurveyMonkey?


There is no dynamic content you can get from the SurveyMonkey trigger in Power Automate except for the Analyze URL, Created Date, and Link. Is it possible I could retrieve the data with an expression so I could add fields to SharePoint or send emails based on answers to questions?

For instance, here is some JSON data for a county multiple choice field, that I would like to know the county so I can have the email sent to the correct person: { "id": "753498214", "answers": [ { "choice_id": "4963767255", "simple_text": "Williamson" } ], "family": "single_choice", "subtype": "menu", "heading": "County where the problem is occurring:" }

And basically, a way to create dynamic fields from the content so it would be more usable? I am a novice so your answer will have to assume I know nothing! Thanks for considering the question.

Overall, anything I have tried is unsuccessful!


Solution

  • I was able to get an answer on Microsoft Power Users support.

    Put this data in compose action: {

    "id": "753498214",
    
    "answers": [
    
      {
    
        "choice_id": "4963767255",
    
        "simple_text": "Williamson"
    
      }
    
    ],
    
    "family": "single_choice",
    
    "subtype": "menu",
    
    "heading": "County where the problem is occurring:"
    

    }

    Then these expressions in additional compose actions:

    To get choice_id: outputs('Compose')?['answers']?[0]?['choice_id']

    To get simple_text: outputs('Compose')?['answers']?[0]?['simple_text']

    Reference link here where I retrieved the answer is here. https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-write-an-expression-to-retrieve-answer/m-p/1960784#M114215