Automatic export tool for Salesforce Data Export backups

Automatic export tool for Salesforce Data Export backups

Have you ever had a close relation with the Salesforce Data Export feature?

It’s a way to periodically export all Salesforce data set in zipped CSV files, including files and attachments.

You can do a one-shot export or schedule it on monthly (available on Developer Edition orgs) or weekly (available on EnterprisePerformance, and Unlimited Editions only).

The one-shot and periodic export configuration is straightforward:

  • Select the file encoding
  • Select which data you want to export (including files and content can increase export size)
  • Select a schedule (for monthyl or weekly export schedule only)
  • Select all or a subset of the available Salesforce objects
No alt text provided for this image

What’s the outcome?

You’ll come up with a set of zipped files with a size up to 512 MB, containing Salesforce extracted files (if checked in configuration) or CSVs grouped by Salesforce objects, as shown below:

No alt text provided for this image

The struggle of downloading

What if you have plenty of files and want to automatically download them one-shot without having to click link by link?

Unfortunately there are no Salesforce standard APIs that you can use to automate the export and the only way was to go by script by getting all download links and triggering each download on a local folder (or remote storage if you are brave enough).

I thought there was already a solution out there but as far as I know there wasn’t anything.

The script

I decided to implement a script in NodeJS that.

Continue on Nerd @ Work. . .

To view or add a comment, sign in

More articles by Enrico MURRU 💡

Explore content categories