Extract Data from Qualtrics File Service Task
About Extracting Data from the Qualtrics File Service
The Qualtrics File Service is a secure and isolated file store API where you can upload files. Using workflows, you can process data you’ve stored in the Qualtrics File service for use elsewhere in Qualtrics. For example, you can store company contacts to the Qualtrics File Service, then regularly import them to your directory.
Connecting to the Qualtrics File Service
The Qualtrics File Service (QFS) is a secured file store API that allows you to upload files for this automation to import.
To use the QFS, upload a file to an HTTPS endpoint, which will be provided in a grey box (shown below), as multipart form-data.
When the automation is scheduled to run, it’ll process any files that have not been processed by the automation yet, including newly uploaded ones.
To use the Qualtrics File Service, you’ll need to call the HTTPS endpoint provided. If the file is generated from the system, you’ll want to provide the API documentation and the following example implementation to your IT or Software Engineering team to integrate with our service.
Example: This example is in cURL format. See the API Overview support page on how to generate an API token.
For Mac and Unix users:
curl -X POST -H "X-API-TOKEN: [YOUR API TOKEN]" \
-F 'file=@/path/to/import/file/sample-file.txt' \
https://datacenterid.qualtrics.com/automations-file-service/automations/AU_XXXXXXXXX/files
For Windows users:
curl -X POST -H "X-API-TOKEN: [YOUR API TOKEN]" ^
-F "file=@/path/to/import/file/sample-file.txt" ^
https://datacenterid.qualtrics.com/automations-file-service/automations/AU_XXXXXXXXX/files
Example: This is a Request Example. See the API Overview support page on how to generate an API token.
POST https://datacenterid.qualtrics.com/automations-file-service/automations/AU_XXXXXXXXX/files HTTP/1.1
Content-Type: multipart/form-data
X-API-TOKEN: [YOUR API TOKEN]
-----------------------------
Content-Disposition: form-data; name="upfile"; filename="sample-file.txt"
Content-Type: text/plain
[FILE DATA]
-----------------------------
Manually Manage Uploaded Files with API
You can also manually manage uploaded files using the Qualtrics API. The following links explain how to interact with the Qualtrics File Service API:
- List all files uploaded for this automation.
- Upload a file to be used by this automation.
- Get the metadata associated with a file.
- Get the contents of a file.
- Remove a file.
At times, these API calls will ask for an automationId. Qualtrics will provide you with this information, formatted as AU_XXXXX.
Before You Get Started
Before you get started extracting data from the Qualtrics File Service, take the following considerations into account:
- What do you want to do with your data? Take a look at the available loader tasks for a list of options.
- Do your files fit a consistent format? For example, files you hope to import in the same workflow should have the same headers / columns / fields, even if the values differ.
Example: You set up a workflow to regularly upload contacts from the Qualtrics File Service to XM Directory. Every file has columns for Firstname, Lastname, Email, Phone, UniqueID, and Location.
Setting Up an Extract Data from Qualtrics File Service Task
- Create an ETL workflow.
- Select Data source (ETL extractor).
- Select Extract data from Qualtrics File Service.
- Make sure your files are uploaded to the Qualtrics File Service using the unique HTTPS endpoint displayed here. For more information, see Qualtrics File Service.
- Choose a file type:
- CSV (comma separated values)
- TSV (tab separated values)
- Custom delimiter: This option is available if you’re using a delimiter other than tabs or commas in your file. Enter the character you use in the field provided. (E.g., ; or | ).
- If desired, select Use PGP to encrypt your files. To learn more about this extra means of encryption and data protection, see PGP Encryption.
- Decide if you’d like to Use strict validation, which will automatically reject extracted files if they have certain formatting issues. Read the message in the task for more information about which files will be rejected. If desired, enable Skip malformed rows to upload your file and exclude any rows with formatting issues.
- Under Upload sample file, add a sample file that has the same headers as the files that will be processed whenever the workflow runs. Click Choose file to upload the file from your computer.
Qtip: If you’d like, you can download the sample files in the task, or download the files in the Example Files section. The only supported file encoding format is UTF-8. Some spreadsheet softwares save files as Unicode UTF-8, which is different from UTF-8, if you are getting unexpected errors. Please ensure that you are exporting in UTF-8 format and not Unicode UTF-8. See CSV & TSV Upload Issues for more troubleshooting steps.
- Verify fields in the file. The table will display the column headers (which represent the individual fields) and their values for the first two rows of data.
Qtip: If you want to upload a different file or make other changes, click Edit the setup. - When you’re finished, click Save.
- Finish building your ETL workflow. When you choose a loader task, you’re deciding the destination of the data you extracted. See available loader tasks for a list of options.