cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jsaulezmakai
New Member

Survey Monkey Custom Variables

Hi

 

Any I idea how i can get the custom variable from a survey monkey survey response body?

 

It is in the body...but not sure how to extract it and set a variable to it.

 

 "custom_variables": {
    "casenum""[32782]"

 

the only variable type i can use is of type Object. Which it does. Any idea how to extract thereafter?

 

 

 

 

full body is as follows

 

{
  "id""11991646621",
  "recipient_id""",
  "collection_mode""default",
  "response_status""completed",
  "custom_value""",
  "first_name""",
  "last_name""",
  "email_address""",
  "ip_address""76.88.129.52",
  "logic_path": {},
  "metadata": {
    "contact": {}
  },
  "page_path": [],
  "collector_id""392061275",
  "survey_id""292175869",
  "custom_variables": {
    "casenum""[32782]"
  },
  "total_time"13,
  "date_modified""2020-09-16T03:49:31+00:00",
  "date_created""2020-09-16T03:49:18+00:00",
  "pages": [
    {
      "id""137696787",
      "questions": [
        {
          "id""531980808",
          "answers": [
            {
              "choice_id""3514855462",
              "row_id""3514855458"
            }
          ]
        },
        {
          "id""531985615",
          "answers": [
            {
              "choice_id""3514887251",
              "row_id""3514887245"
            }
          ]
        },
        {
          "id""531982591",
          "answers": [
            {
              "choice_id""3514867978",
              "row_id""3514867971"
            }
          ]
        }
      ]
    }
  ]
}
2 REPLIES 2
efialttes
Super User
Super User

Hi!

I would do the following

1.- Add an 'Initialize variable' action block, name 'mySurveyMonkeyResponseBody', type Object, assign as its value your surveymonkeyResponseBody

2.- Add an 'Initialize variable' action block, name 'myCustomVariable', type Object, assign as its value the following WDL expression:

variables('mySurveyMonkeyResponseBody')?['custom_variables']

If you are not familiar with WDL expressions and how to add them please check here:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Please note you can access casenum value following the same approach, i.e.

variables('mySurveyMonkeyResponseBody')?['custom_variables']?['casenum']

or

variables('custom_variables')?['casenum']

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



I was having the same issue and this solved it. Thanks

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,073)