How can I use the API to copy data from my Contact List (Trigger) to a Google Sheet? | XM Community
Solved

How can I use the API to copy data from my Contact List (Trigger) to a Google Sheet?

  • 25 April 2018
  • 7 replies
  • 55 views

Userlevel 6
Badge +8
I'd like to make the data from my Contact List Trigger (using to collect data throughout a workflow) and I'd like to copy the contact list (all fields and data in them) to a Google Sheet so I can then "share" with others. Any ideas? I'm guessing I need an API Call.
icon

Best answer by TomG 25 April 2018, 22:35

View original

7 replies

Userlevel 7
Badge +27
Yes, to automate the process you would need to use the Qualtrics API to get the Contact information and the Google Sheets API to update a Google Sheet. You could do it manually by exporting your Contact info to a CSV then import it to your Google Sheet.
Userlevel 6
Badge +8
Thanks Tom! Any experience in those calls?

I may have to rework it and instead of using a contact list, pull the data from the Results (responses).
Userlevel 7
Badge +27
I have experience with the Qualtrics API calls for contacts and responses (contact calls are different depending on if you are using Target Audience or not). In version 3 of the API contact calls are easier to code that response exports. I haven't used the Google Sheets API.
Userlevel 6
Badge +8
do you have an example of an API call to a survey's responses to pull them? All I can find is a call to an "export" which then creates a zip file? Any place you can point to for good examples of API calls for responses?
Userlevel 6
Badge +8
Tom,
Actually I found this post from you: https://www.qualtrics.com/community/discussion/comment/1409#Comment_1409 which seems to explain it. Wow...definitely want to use the older API call. I'd like to be able to pull in new responses into a Google Sheet, either periodically (on a schedule) or as they are saved.
Userlevel 7
Badge +27
Well, unfortunately, in version 3.0 of the API you get response data by exporting it. There is an outstanding feature request to get a response by response id in json format. This is why I said it is easier to code getting contact data.

You can get response data using getLegacyResponseData in version 2.5 of the API.
Thanks, @TomG! "Getting a response by response ID in JSON format" is on our feature backlog for V3 APIs. We are hoping to have it released soon!

Leave a Reply