How to Automate Data Loader Exports in Salesforce
Updated · By the Clientell AI team · How we write
To automate Data Loader, run it from the command line. Create a process-conf.xml file with an export process, encrypt your password, then call process.bat with the config folder and the process name. Schedule that command with Windows Task Scheduler. The command line works on Windows only. For simple backups, use Setup Data Export instead.
How to schedule a Data Loader export
This guide is about scheduled exports (extract jobs). For imports, upserts and every other Data Loader job, see the Data Loader automation hub. Data Loader needs Java 17 or later. Batch mode is supported on Windows only. Use the latest Data Loader version.
- 1
Install Data Loader and Java
Download the latest Data Loader from the Salesforce developer site and install Java Runtime Environment 17 or later.
- 2
Choose a login method
Data Loader v64.0.1 and later can log in with OAuth 2.0. If you use a password, encrypt it: run encrypt.bat from the bin folder, generate a key file with -k, then encrypt the password with -e.
- 3
Copy and edit process-conf.xml
Copy the sample process-conf.xml from the samples\conf folder. Add one bean for your export (see the example below). Set the object, the SOQL query and the output CSV path. Remove sfdc.password if you use OAuth.
- 4
Run it once by hand
From the Data Loader bin folder, run: process.bat "C:\Users\username\dataloaderconfig" accountExtract. The first value is the folder with process-conf.xml. The second is the bean id.
- 5
Schedule the command
Put that command in a .bat file and run it on a schedule with Windows Task Scheduler, or any scheduler you already use on Windows.
- 6
Check the logs
Data Loader writes success and error CSV files for each run. Read them, or send them to your team, so a failed run does not go unnoticed.
- 7
Or use the built-in Data Export
In Setup, search for Data Export and choose Schedule Export. You can pick weekly or monthly (weekly is available in Enterprise, Performance and Unlimited editions) and Salesforce emails you a zip of CSV files. This needs no install, but you cannot filter with SOQL.
Example bean for a scheduled Account export in process-conf.xml
<beans>
<bean id="accountExtract"
class="com.salesforce.dataloader.process.ProcessRunner"
scope="prototype">
<property name="name" value="accountExtract"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.endpoint" value="https://yourInstance.salesforce.com"/>
<entry key="sfdc.username" value="user@example.com"/>
<entry key="sfdc.password" value="ENCRYPTED_VALUE_FROM_ENCRYPT_BAT"/>
<entry key="process.encryptionKeyFile" value="C:\Users\username\.dataloader\dataLoader.key"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="sfdc.extractionSOQL" value="SELECT Id, Name, OwnerId FROM Account"/>
<entry key="process.operation" value="extract"/>
<entry key="dataAccess.type" value="csvWrite"/>
<entry key="dataAccess.name" value="C:\DLTest\Out\accounts.csv"/>
</map>
</property>
</bean>
</beans>Names follow the Data Loader Guide. Replace the paths, endpoint and user with your own.
Sources: Salesforce Data Loader Guide (Winter '27); Related hub: Data Loader automation for Salesforce
The Challenge
Manual data exports are time-consuming, error-prone, and create compliance risks when sensitive data is exported without proper filtering. Teams often rely on individual admins running Data Loader manually on inconsistent schedules, leading to stale data in downstream systems.
Or let Clientell AI do it
Clientell AI configures automated export pipelines with precise field selection, record filtering, and scheduled delivery to your target systems. It generates the complete configuration including SOQL queries, field mappings, format transformations, and connection settings for external destinations.
How It Works
- 1
Specify export requirements
Define the objects, fields, filter criteria, export format, schedule frequency, and destination for each automated export you need.
- 2
AI builds export config
Clientell AI generates the export configuration, including optimized SOQL extraction queries, field mapping files, format transformation rules, and scheduling parameters.
- 3
Review and validate
Test the export configuration against a sandbox to verify record counts, field accuracy, formatting correctness, and successful delivery to the target destination.
- 4
Activate scheduled exports
Deploy the automated export schedule, configure monitoring alerts for failures, and set up audit logging to track what data is exported and when.
Frequently Asked Questions
- What export formats are supported?
- The generated configurations support CSV, JSON, and XML output formats. Field-level transformations such as date formatting, currency conversion, and picklist value mapping can be applied before delivery.
- Can exports be delivered directly to cloud storage or SFTP?
- Yes. Clientell AI generates connection configurations for common destinations including AWS S3, Google Cloud Storage, Azure Blob, and SFTP servers, with appropriate authentication and encryption settings.
- How is sensitive data handled during automated exports?
- The configuration includes field-level filtering to exclude sensitive fields, and you can apply masking rules for partial data protection. Export audit logs track every execution for compliance purposes.
- Can Data Loader run on a schedule on a Mac?
- The Data Loader app runs on macOS and Windows, but the command-line batch mode is supported on Windows only, per the Data Loader Guide. On a Mac, use Setup Data Export or an integration tool for scheduled jobs.
- How do I schedule Data Loader?
- Write the command that runs your process.bat, then add it to a scheduler such as Windows Task Scheduler. Data Loader has no scheduler of its own.
Related Automations
Import Mapping
Auto-map CSV columns to Salesforce fields with AI. Detect type mismatches and resolve mapping errors before import. Built with Clientell AI.
Data LoaderMigration Automation
Automate Salesforce cross-org data migration with dependency mapping. Preserve relationships and migrate records safely.
AccountData Cleanup
Standardize and clean Salesforce account data with AI. Build validation rules, formatting automation, and bulk data cleanup processes.