In Salesforce, Data Loader is a client application provided by Salesforce to facilitate data management, and with the help of this tool, we can insert, update, delete, or export records. It saves a lot of users’ time by automating and streamlining the task of importing and exporting the data in Salesforce.
If you working as a System administrator then data loader is a handy tool for you when you need to import or export the data in your org environment. The Data loader is efficient in transferring bulk data that too with an automated process.
In this Salesforce tutorial, I will explain the method of inserting or uploading files into records with the help of Salesforce Dataloader. Along with this, we will also discuss the blueprint of a .csv file through which we will upload the record.
Insert File with Dataloader in Salesforce
To insert files using a data loader, you must have administrative access to records and have the data loader installed on your system. If you meet these conditions, follow the steps below.
1. First, we will create a CSV file with the columns heading mentioned below.
Title – Enter the name of the file and the user will see this file name in the related list folder.
Description – Enter the description of the file.
VersionData – Enter the location path of the file that you have to upload from your system.
PathOnClient – It is required to enter the complete path of the file that you will upload.
FirstPublishLocationId – In this column, enter the ID of the Salesforce object record to which the file gets associated. To get this ID open the record and copy the ID from the URL. For example, in the URL “http//Contact/0035i00003ORfzxAAD/view” the id is referred to as 0035i00003ORfzxAAD.
After creating the csv file save it in your system.

2. Now login to your data loader, click on the Settings tab then select Settings.

3. In the settings of the data loader go to the field Batch size and enter it according to the number of records. I am uploading one record so I have entered it as 1.
The default batch size in Data Loader is 200 or, if you select “Enable Bulk API”, the default batch size is 2,000.

4. In this step, we will select the data object and for that activate the checkbox Show all Salesforce objects then in the list select the option Content Verison.
After this browse the CSV file and click on the Next button.

5. As we click on the Next button, a pop-up will appear showing the number of rows in the file, Batch Size, Used API, and API usage limit of the org, here click on the OK button.
6. In this step, it is optional to add the Lookup fields that you can select from the fields Content Document, after this click on the Next button.

7. In this step, we will do the mapping of column headers in csv file with the standard Salesforce objects and for that click on the button Create or Edit a Map.
In the next window, click on the button Auto-Match Fields to Columns and this will auto-fill the lookup name of the objects according to the CSV column headers.
After this click on the OK button then click on the Next button.

8. In this window, select a folder to save the success and error files of the import that can be accessed later, and after this click on the Finish button.

9. In this warning message window, click on the Yes button to proceed.

10. After the successful insertion of files, a message of operation completion will appear showing the errors and success of the operation.

We can see that in the above image, we have inserted 4 records with CSV files and we got 4 successful inserts and 0 errors that indicates a complete successful insertion.
11. Now to view the inserted files open the record that you have entered in the FirstPublishLocationId. In this example, I have inserted the files into the account object.

As we can see in the above image, the files are successfully inserted into the Account record.
In this way, we can insert files with Data Loader in Salesforce by following the above steps.
Conclusion
In Salesforce, uploading files in internal records using Data Loader is an efficient way of data handling that enhances data management capabilities. By following the above steps, you can efficiently insert files in Salesforce using the data loader.
Along with this, you might have insights to create a CSV file by defining the header columns as we have discussed above.
You may like to read
- How to Install Salesforce Data Loader for Windows
- How to Import Users Using Data Loader In Salesforce
- Expire Password For Users in Salesforce
- How to Recover and Restore the Deleted Data using the Salesforce Data Loader
- How to Assign Permission Sets to Users in Salesforce
- How to Mass update Account Ownership with Data Loader in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.