FTC ArticlesFTC Processes FTC ProjectsQualtrics Auto-Export Documentation

Qualtrics Auto-Export Documentation

In April 2017, Internships and Career Services asked the FTC to write a program that automatically exports data from a Qualtrics Survey to the idrive. Colin Jensen and Grant Hopkins (mostly Grant because he's a stud) wrote this program. This article documents their methods.

Qualtrics API

BYU-Idaho's Qualtrics license includes access to the Qualtrics API. Each brand administrator for the campus gets an API token that acts like a password. It grants access to data within Qualtrics (if you're getting data from a survey, the brand administrator has to be added to those surveys). Here's how to get your API token:


In Qualtrics, click on the silhouette in the top right, then Account Settings, then Qualtrics IDs.

If a token does not already show up, you may have to click Generate Token.

Calling the API

Qualtrics has some excellent documentation for their API. It can be accessed here: https://api.qualtrics.com/. In order to export the survey data through the API, two HTTP requests must be made: one to create an export ID and another to actually export the file (we used an optional third HTTP request to check on the progress of the download).

First, a POST request must be made. Three things are required to make this request: the brand administrator's API token, the survey ID, and the format for the export ("csv2013" in the program we built). The response to this request contains an ID that must be used in the subsequent GET request. The response to that GET request contains a .zip file that, in turn, contains the .csv file containing the survey data.

Python File

The actual implementation of the program is a python file called qualtricsExport.py. The file is housed on the FTC virtual server at C:\Users\cjense77\Documents\QualtricsExportProject\qualtricsExport.py. In Windows Task Scheduler, the python file is set to run every morning at 7:00 and to repeat four times. The python script downloads the specified survey data and then moves it into a Google Drive folder that we have shared with the Internships and Career Services office.

There is a log file located here that records the progress of the script each day.