Automating Qualtrics Survey Creation Using R statistical software | XM Community
Skip to main content
Solved

Automating Qualtrics Survey Creation Using R statistical software


Forum|alt.badge.img+2

In Qualtrics I have a general survey template that I use to make hundreds of surveys. These surveys are almost identical with the only difference between them being certain words on the surveys vary between surveys (e.g., client name, various brand names, etc.). The questions and structure of the survey remain the same. Currently I have to duplicate a survey and the search and replace brand names, and repeat.

I am most familiar coding in R and would love if possible to find a way I can automatically create these surveys in R using a package like httr2.

My general thought is load in .qsf file of template into r. Make relevant changes to the qsf file for any number of surveys, and then have those surveys automatically created in my Qualtrics account.

Has anyone done something like this and can give guidance on the workflow?

Best answer by ian_c_young

Thanks for the response. I figured out how to automate it using r/httr2.

Export from qualtrics .qsf file of template ->
Read template into r and search and replace relevant items ->
Write file to directory →
Run api request to take file and create survey in qualtrics

View original

3 replies

Forum|alt.badge.img+2
  • Author
  • 2 replies
  • January 7, 2025

I am open to a workflow using another software (python, etc.) but I primarily know how to code in R.


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • January 13, 2025

First, you’ll need to create the base survey in Qualtrics. Try to keep it as clean as possible  - avoid deleting questions, reordering outside the survey flow etc.

 

Then you’ll need to hit two endpoints, first, only once to get the base survey: https://api.qualtrics.com/9d0928392673d-get-survey

This will give you some text, in JSON format. Make only the required changes to this. 

Then you hit the second enpoint to create the survey: https://api.qualtrics.com/41ff4dba22c75-create-survey


Forum|alt.badge.img+2
  • Author
  • 2 replies
  • Answer
  • January 15, 2025

Thanks for the response. I figured out how to automate it using r/httr2.

Export from qualtrics .qsf file of template ->
Read template into r and search and replace relevant items ->
Write file to directory →
Run api request to take file and create survey in qualtrics