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 III
Super User III

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (43,359)