Extract and Export Qualtrics Basic Transform Task Field Mappings to CSV

Documenting field mappings in Qualtrics workflows can be tedious, especially when working with Basic Transform tasks that have dozens of fields. This free browser-based tool extracts your complete Basic Transform configuration in seconds.

The Challenge

When working with Basic Transform tasks in Qualtrics Workflows, you regularly need to:

Manually copying this information is time-consuming and error-prone. A single missed field or transposed name can cause data flow failures in production.

The Solution

A simple JavaScript tool that runs directly in your browser and extracts all Basic Transform field mappings instantly:

Watch the Demo

How to Use

1

Open Basic Transform Configuration

Navigate to your Qualtrics Workflow and open the Basic Transform task. Make sure the field mapping table is visible on screen before running the script.

2

Open the Browser Console

Right-click anywhere on the mapping table and select Inspect or Inspect Element from the context menu.

In the developer tools panel that opens, click the Console tab.

Why right-click on the table? This ensures the correct DOM elements are loaded in the inspector before the script runs, making extraction more reliable.
3

Copy and Run the Extraction Script

Click the Copy Script button below, paste it into the console, and press Enter. The script runs immediately and stores your mappings in memory.

4

Export Your Data

After the extraction script runs, call one of these export commands in the console:

// Download as CSV file
downloadBasicTransformCSV()

// Copy CSV to clipboard
copyBasicTransformCSV()

// View as JSON
getBasicTransformJSON()

The Script

 
/**
 * Qualtrics Basic Transform Field Mapper Extractor v1.0
 * Extracts field mapping configuration from "Basic Transform" workflow task
 * Compatible with Qualtrics Workflow Editor
 * Developed by Pirai AI — piraiai.com
 * Last updated: March 09, 2026
*/

(function() {
    console.log('🚀 Qualtrics Basic Transform Extractor v1.0');
    console.log('📋 Extracting field mappings...');

    // Find all mapping rows
    const rows = document.querySelectorAll('tbody._2rtpf tr._Q2IPs');
    
    if (rows.length === 0) {
        console.error('❌ No mapping rows found. Make sure you are on the Basic Transform configuration screen.');
        return;
    }

    const mappings = [];
    
    rows.forEach((row, index) => {
        try {
            // Extract Required checkbox (3rd column)
            const requiredCheckbox = row.querySelector('td:nth-child(3) input[type="checkbox"]');
            const isRequired = requiredCheckbox ? requiredCheckbox.checked : false;
            
            // Extract Source Field (4th column - button with span._rR2lD)
            const sourceFieldButton = row.querySelector('td:nth-child(4) button[data-testid="source-field-selector"] span._rR2lD');
            const sourceField = sourceFieldButton ? sourceFieldButton.textContent.trim() : '';
            
            // Extract Destination Field Name (5th column - input)
            const destFieldInput = row.querySelector('td:nth-child(5) input[data-testid="destination-name-input"]');
            const destFieldName = destFieldInput ? destFieldInput.value.trim() : '';
            
            // Extract Field Type (6th column - button with span containing field type)
            const fieldTypeButton = row.querySelector('td:nth-child(6) button[data-testid="source-field-type-selector-button"] span._8kwlb');
            const fieldType = fieldTypeButton ? fieldTypeButton.textContent.trim() : '';
            
            mappings.push({
                index: index + 1,
                required: isRequired,
                sourceField: sourceField,
                destinationFieldName: destFieldName,
                fieldType: fieldType
            });
            
        } catch (error) {
            console.warn(`⚠️ Error extracting row ${index + 1}:`, error);
        }
    });

    // Store in global variable
    window.basicTransformMappings = mappings;
    
    console.log(`✅ Extracted ${mappings.length} field mappings`);
    console.log('📊 Data stored in: window.basicTransformMappings');
    
    return mappings;
})();

// ============================================================================
// EXPORT FUNCTIONS
// ============================================================================

function downloadBasicTransformCSV() {
    if (!window.basicTransformMappings || window.basicTransformMappings.length === 0) {
        console.error('❌ No mappings found. Please run the extraction script first.');
        return;
    }
    
    // Create CSV content
    let csv = '"Index","Required","Source Field","Destination Field Name","Field Type"\n';
    
    window.basicTransformMappings.forEach(mapping => {
        const required = mapping.required ? 'Yes' : 'No';
        csv += `"${mapping.index}","${required}","${mapping.sourceField}","${mapping.destinationFieldName}","${mapping.fieldType}"\n`;
    });
    
    // Download CSV
    const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
    const link = document.createElement('a');
    link.href = URL.createObjectURL(blob);
    link.download = 'basic_transform_mappings.csv';
    link.click();
    
    console.log('✅ CSV downloaded: basic_transform_mappings.csv');
}

function copyBasicTransformCSV() {
    if (!window.basicTransformMappings || window.basicTransformMappings.length === 0) {
        console.error('❌ No mappings found. Please run the extraction script first.');
        return;
    }
    
    // Create CSV content
    let csv = '"Index","Required","Source Field","Destination Field Name","Field Type"\n';
    
    window.basicTransformMappings.forEach(mapping => {
        const required = mapping.required ? 'Yes' : 'No';
        csv += `"${mapping.index}","${required}","${mapping.sourceField}","${mapping.destinationFieldName}","${mapping.fieldType}"\n`;
    });
    
    // Copy to clipboard
    navigator.clipboard.writeText(csv).then(() => {
        console.log('✅ CSV copied to clipboard');
    }).catch(err => {
        console.error('❌ Failed to copy to clipboard:', err);
    });
}

function getBasicTransformJSON() {
    if (!window.basicTransformMappings || window.basicTransformMappings.length === 0) {
        console.error('❌ No mappings found. Please run the extraction script first.');
        return null;
    }
    
    console.log(JSON.stringify(window.basicTransformMappings, null, 2));
    return window.basicTransformMappings;
}

// ============================================================================
// USAGE INSTRUCTIONS
// ============================================================================
console.log(`
╔════════════════════════════════════════════════════════════════════╗
║  Qualtrics Basic Transform Extractor v1.0 - Ready!                ║
╠════════════════════════════════════════════════════════════════════╣
║                                                                    ║
║  📥 DOWNLOAD CSV:                                                  ║
║     downloadBasicTransformCSV()                                    ║
║                                                                    ║
║  📋 COPY TO CLIPBOARD:                                             ║
║     copyBasicTransformCSV()                                        ║
║                                                                    ║
║  🔍 VIEW JSON:                                                     ║
║     getBasicTransformJSON()                                        ║
║                                                                    ║
║  💾 ACCESS DATA:                                                   ║
║     window.basicTransformMappings                                  ║
║                                                                    ║
╚════════════════════════════════════════════════════════════════════╝
`);

CSV Output Format

The exported CSV includes five columns covering everything you need to document or compare a Basic Transform configuration:

"Index","Required","Source Field","Destination Field Name","Field Type"
"1","No","Customer_Age_Range","Customer_Age_Range","Text value"
"2","No","Customer_Loyalty_Tier","Customer_Loyalty_Tier","Text value"
"3","Yes","Foot_Traffic_Volume","Foot_Traffic_Volume","Number"
"4","No","Transaction_Date","Transaction_Date","Date"
Column Description
Index Row order in the mapping table, useful for spotting field order differences across environments
Required Yes or No, captures which fields are mandatory for the transform to complete
Source Field The incoming field name from the data source
Destination Field Name The target field name written to the output
Field Type Data type (Text value, Number, Date, etc.)

Comparing Across Environments (Dev, Test, and Prod)

One of the most powerful use cases is comparing Basic Transform configurations across different Qualtrics environments before deployment. Configuration drift between Dev, Test, and Prod is one of the most common causes of workflow failures that are difficult to diagnose.

1

Extract from Development Environment

Open your workflow in the Dev environment, run the extraction script, and download the CSV. Save it as basic_transform_mappings_DEV.csv.

2

Extract from Test Environment

Repeat the process in Test and save as basic_transform_mappings_TEST.csv.

3

Extract from Production Environment

Extract from Prod and save as basic_transform_mappings_PROD.csv.

4

Compare with Pirai AI CSV Comparator

Upload two CSV files to the Pirai AI CSV Comparator to instantly identify mismatches. The tool shows differences row by row so you can spot missing fields, type mismatches, required flag changes, and naming inconsistencies without needing Excel or any external service. Your data stays in the browser.

What to Look for During Comparison

Common configuration drift patterns

  • Missing fields : present in Dev but absent in Prod
  • Field type mismatches : Text value in Dev, Number in Prod for the same field
  • Required status changes : a field mandatory in one environment but optional in another
  • Name discrepancies : Store_Location in Dev became Store_Region in Prod without documentation
  • Index order differences : fields in a different sequence, which can affect downstream processing

Use Cases

📄

Workflow Documentation

Create comprehensive mapping records for team onboarding and knowledge transfer.

🔄

Environment Migrations

Compare configurations when promoting workflows from Test to Production.

Audit and Compliance

Maintain reproducible records of field mapping configurations for audit trails.

📋

Template Creation

Document successful workflow patterns to replicate across projects.

🔍

Troubleshooting

Quickly identify mapping discrepancies when debugging data flow issues.

🚀

Pre-Deployment Validation

Verify all field mappings match before pushing changes to Production.

Key Features

Runs in Your Browser

Your data never leaves your machine. The script extracts information directly from the Qualtrics page you are viewing. No installation, no server, no account needed.

Multiple Export Formats

Download a CSV file for Excel or Google Sheets, copy CSV directly to the clipboard for quick pasting, or view the full JSON output for developer workflows.

Complete Field Information

Every row includes the field index (order), required status, source field name, destination field name, and field type. Nothing is truncated or omitted.

Best Practices

Version Control Your Exports

Save extracted CSVs with environment and date stamps so you have a full history of configuration changes:

basic_transform_mappings_PROD_2026-03-09.csv
basic_transform_mappings_TEST_2026-03-09.csv
basic_transform_mappings_DEV_2026-03-09.csv

Document Changes

When you find discrepancies between environments, note whether they are intentional. A Required flag that differs between Dev and Prod may be deliberate, or it may be a deployment oversight.

Regular Audits

Extract and archive configurations monthly to catch configuration drift early, before it causes data pipeline failures.

Pre-Deployment Checklist

Always compare Dev/Test/Prod CSVs before deploying workflow changes. Use the CSV Comparator to make this a fast, repeatable step in your deployment process.

Troubleshooting

No mapping rows found

Make sure you are on the Basic Transform configuration screen with the field mapping table visible. The script targets specific DOM selectors that only appear on that screen.

Empty CSV after export

Run the main extraction script first before calling any export function. The export functions read from window.basicTransformMappings, which is only populated after the extraction script runs.

Script not working

Clear your browser console and paste the script again. Ensure you are using a modern browser (Chrome, Edge, or Firefox). Internet Explorer is not supported.

Important notes: This is a browser-based tool requiring no installation. Your data stays private and everything runs locally in your browser. Works with all Qualtrics licence types and requires no API key.

Automate Your Survey Workflow

Pirai AI converts Word, PDF, and Excel questionnaires into Qualtrics and 20+ other platforms automatically. No manual scripting required.

Try Pirai AI Free