Setting Up Daily Salesforce Contacts Backup to Dropbox

In this tutorial we will show how to configure a daily Salesforce contacts backup to Dropbox. The tutorial can actually be applied for backing up any Salesforce objects.

ExpandedToggleIcon        Creating Connections

In order to export data from Salesforce to a file, uploaded to Dropbox, first we need to create connections to Salesforce and Dropbox. If you have already created the necessary connections, you may skip these steps. To create a connection to Salesforce, perform the following steps:

1.Click Connections in the menu on the left side of the page to switch to the Connections page.
2.On the Connections page click the New button.
3.In the opened pane click Salesforce.
4.Specify the connection Name, for example, Salesforce1.
5.From the Environment drop-down list select the Salesforce environment type to import data to.
6.From the Authentication drop-down list select the authentication method for connecting to Salesforce. If you don't mind storing your Salesforce credentials on our Skyvia server, select User Name & Password. If you prefer not to store your credentials, select OAuth 2.0.
7.If you have selected User Name & Password, on the previous step, specify your Salesforce account e-mail, password, and security token. Otherwise, if you have selected OAuth 2.0 authentication, click the Log In with Salesforce button and login via the Salesforce website on the opened page. The result OAuth token will be stored in the connection data. Your Salesforce credentials will not be stored on our website.
8.Click the Save button to save the connection.

To create a connection to Dropbox, perform the following steps:

1.Click Connections in the menu on the left side of the page to switch to the Connections page.
2.On the Connections page click the New button.
3.In the opened pane click Dropbox.
4.Specify the connection Name, for example, Dropbox1.
5.Click Log In with Dropbox.
6.Enter your Dropbox credentials and click Sign In
7.Click the Allow button.
8.Click the Save button to save the connection.

Now we have the necessary connections created. Let's create a package that performs the necessary operation.

ExpandedToggleIcon        Creating Package

Now let's create the corresponding export package.

1.Click Integration in the menu on the left side of the page.
2.Click the New button in the top right corner of the page.
3.Click Export.
4.In the Source header click Select and select Salesforce in the drop-down list.
5.Select Salesforce1 in the Source Connection drop-down list.
6.In the Target header click My PC and select Dropbox in the drop-down list.
7.Select Dropbox1 in the Source Connection drop-down list.
8.Click the + Add task to open the Task Editor.
9.From the Object drop-down list select Contact.
10. Select the check box near Contact to export all the Contact fields.
11. Click the Save button at the bottom of the Task Editor.

By default, Skyvia creates a CSV file with the name of the exported object (in our case "Contact") and appended timestamp of the export operation, separated by the underscore character. Thus, the new files will not overwrite the older ones. However, you can disable adding a timestamp if you want the files to be overwritten in the package Naming options. Or you can set a custom name for the result file in the Target File Name box in Task Editor. In this case, the timestamp will also not be added to the file.

If you need to backup several Saleforce objects at once, you may simply add more import tasks with the necessary object in the same way - just repeat the steps 8 - 11 selecting the necessary objects instead of Contact.


ExpandedToggleIcon        Scheduling Package Execution

After we have created the export package for performing backup, we want it to run periodically in order to always have a fresh backup. For this, we will configure the package to run every day on a specified time.

If you have saved the package, open it for editing. For this, on the Package Details page click the Edit button, or on the Integration Packages page point to the gear button in the Action column of the package row and then click the Edit button.

Perform the following actions to set the schedule:

1.Under Schedule (at bottom left of the package editor) click the Set schedule button.
2.In the Run every drop-down list select Day.
3.Set the backup operation execution time near Occur once at.
4.Optionally select At a specific time in the Starting list and specify the necessary date and time, after which the automatic package execution is started on schedule if you want to delay it.
5.Optionally specify your Time Zone.
6.Save the package.


After this our package will run automatically every day on the specified time.

You can also visit Scheduling Packages to get more detailed information on setting a package schedule.

That's all, the package is created. It will back Contacts up to CSV files to Dropbox. To restore Contacts from a CSV file, you can use Import package.