cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Survey Monkey Responses and API

There have been multiple posts that we can connect to Survey Monkey accounts through Power Automate (which I have done), but then you cannot actually retrieve and view the survey responses (only a link to to the account), so the usefulness is very limited.  Has anyone tried getting an API key from their Survey Monkey account, which then allows access to the responses and more details about a survey, then in Power Automate, use an HTTP call and possibly JSON parsing to get responses from Survey Monkey?  Lots of work. 

 

I may try this, but if anyone has already done it, I would love to know.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Survey Monkey Responses and API

Hi @Runner55552 

 

I just delivered a  project integration with Survey Monkey to D365.

 

There are two ways you can retrieve the responses.

 

1. Use the standard Survey Monkey trigger "When a new survey response is added". This is used when you want to capture the response immediately and process it. Here you get the response in JSON format. You need to parse the JSON and process the responses against each question id.

 

2. The other method is a batch process. So here I have used a HTTP Request action step to get all the responses specified from a particular date onwards. The URL is https://api.surveymonkey.net/v3/surveys/yoursurveryid/responses/bulk . Here you need to replace your survey id.

 

To retrieve the response via HTTP you need to register your app

 

https://developer.surveymonkey.com/api/v3/#getting-started

 

Once you followed the above documentation you get the following details from Survey Monkey.

 

Client ID, Secret Key, Access Token & OAuth Redirect URL

 

You don't need to register the OAuth Redirect URL initially.

 

Your app will be registered under the below address.

 

https://developer.surveymonkey.com/apps

 

Once the app registration is done  you need the  Client ID, Secret Key & Access Token.

 

Next you need to create a custom connector in Flow using the above details Client ID, Secret Key, Access Token .

 

At this stage you will have the redirect URL. Copy and paste the URL under Survey Monkey App registration OAuth Redirect URL.

 

Once you successfully created the custom connector you can create the action step to retrieve the responses from Survey Monkey.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Survey Monkey Responses and API

Hi @Runner55552 

 

I just delivered a  project integration with Survey Monkey to D365.

 

There are two ways you can retrieve the responses.

 

1. Use the standard Survey Monkey trigger "When a new survey response is added". This is used when you want to capture the response immediately and process it. Here you get the response in JSON format. You need to parse the JSON and process the responses against each question id.

 

2. The other method is a batch process. So here I have used a HTTP Request action step to get all the responses specified from a particular date onwards. The URL is https://api.surveymonkey.net/v3/surveys/yoursurveryid/responses/bulk . Here you need to replace your survey id.

 

To retrieve the response via HTTP you need to register your app

 

https://developer.surveymonkey.com/api/v3/#getting-started

 

Once you followed the above documentation you get the following details from Survey Monkey.

 

Client ID, Secret Key, Access Token & OAuth Redirect URL

 

You don't need to register the OAuth Redirect URL initially.

 

Your app will be registered under the below address.

 

https://developer.surveymonkey.com/apps

 

Once the app registration is done  you need the  Client ID, Secret Key & Access Token.

 

Next you need to create a custom connector in Flow using the above details Client ID, Secret Key, Access Token .

 

At this stage you will have the redirect URL. Copy and paste the URL under Survey Monkey App registration OAuth Redirect URL.

 

Once you successfully created the custom connector you can create the action step to retrieve the responses from Survey Monkey.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Survey Monkey Responses and API

Thanks, this is great! A couple of questions: 1. Are you able to share screenshots of your Flow, if not confidential?

2. You mentioned using an HTTP Request action step.  Would this be an HTTP request inside the Flow, then follow that with the custom action step that parses/retrieves the responses?

 

I have already registered an app, and successfully connected to Survey Monkey through an HTTP step in the Flow, but have not yet managed to retrieve a list of questions and answers to a survey.  It sounds like the custom action step would be more efficient.

 

surveyMonkeyScreenshot.png

 

Highlighted
Super User III
Super User III

Re: Survey Monkey Responses and API

Hi @Runner55552 

 

Thanks for your reply. I could do a screenshare later this evening. Will send you some details in your email.

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Helper IV
Helper IV

Re: Survey Monkey Responses and API

Update: managed to parse out survey questions and responses and push to a flat table in SQL database. Used the Get request as stated above (bulk responses), then a parse json action to get the entire list of questions/responses in a json object, then a Select action to map individual questions to answers.  Finally, an insert row to SQL action, referencing the output from the Select action.

Highlighted
Helper IV
Helper IV

Re: Survey Monkey Responses and API

I do have one more question. We managed to get this all working in Power Automate, using a get request (bulk responses), then a Select statement to map out the individual questions and answers.  However, I noticed that the output from the HTTP Get request would completely eliminate a question and its answer in cases where the user did not insert an answer to an optional question.  We did not have Skip logic in the survey design, but when answers were left blank, it appears, the Get request simply eliminated that question and answer in the response.  This caused problems in our Select statement, because we used array references (0 to 6) to refer to the 7 questions.  For those responses with skipped answers, I received this error in Power Automate: 

"'The template language expression 'items('Apply_to_each')?['pages'][0]?['questions'][6]?['heading']' cannot be evaluated because array index '6' is outside bounds (0, 5) of array."

 

And when looking at the output from the HTTP Get request action, that is correct. One of the questions where the respondent did not answer a question was eliminated in the HTTP response, thus reducing the array length from 6 to 5.

 

Have you encountered anything like this? I have emails in to SurveyMonkey support to see if we can return ALL answers, regardless of whether the answer is blank, but have not heard back yet.   Is there any workaround to this, to check for skipped answers, then increment the array as needed? Seems that may be complicated.

 

Thanks.

 

Mark

Highlighted
Super User III
Super User III

Re: Survey Monkey Responses and API

Hi @Runner55552 

 

You could add an option called  Not Applicable and make it mandatory. 

 

The other option is find the count of the questions and iterate using a Do while loop to get the answers.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Helper IV
Helper IV

Re: Survey Monkey Responses and API

Got a response from SurveyMonkey confirming that their API works by essentially removing array elements when not present, which changes the structure of the data.  We created tests and checks with conditions in our Flow to work around this, and literally change the numbering of our array elements as needed with "counter" variables.

The better method is to make sure you design your survey as simple as possible.  As you stated below, having all questions mandatory, and where possible, having choices (on choice fields) like NA, would help.  Our survey had optional questions, and some questions with a main heading and two parts to the question.  This is fine if just manually exporting an Excel file from SurveyMonkey, but definitely causes complications when using the API. However, it is working fine now, and in "maintenance" mode, running once a day to check for new survey responses and push the new responses into our SQL database.

Thanks for your help on this.  It was definitely a learning process.

 

SM_Flow.png

Highlighted
Super User III
Super User III

Re: Survey Monkey Responses and API

Hi @Runner55552 

 

Thanks for your reply. Yes making the  survey simple is the best way especially integrating via API. What survey monkey lacking is when it designing the question and answers it should have given an optional text where we can store the target system reference such as name or id. Later this will be really helpful from JSON result sets where we can easily extract the answers against the target system reference/id/name (sql column name or something). 

 

Thanks again for all the communications related to this topic. Definitely this will be useful for others.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
New Member

Re: Survey Monkey Responses and API

Hi @Runner55552 great post!

I'm trying to achieve a very similar outcome and wondered if you wouldn't mind sharing this Flow in a little more detail?

 

It is possible to screen grab the actions in an expanded state to see the inner working?

 

Thanks in advance

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (6,482)