Print this page

How do I import attachments using my Data Export files?

Knowledge Article Number 000003866

How do I import attachments using my Data Export files?

1. If you have the Attachment.csv file from Exporting Backup Data see Renaming exported Attachments/Documents files in a data export for instructions on re-associating your exported attachment file names to prepare your data for import.

If you do not have an export's Attachment.csv file create a new CSV with the following columns. If you are using an export's Attachment.csv you will need to ensure that you update and include the following columns:

ParentId: Id of the record to which the attachment should be associated
Name: Name of the attachment (Including the file extension)
ContentType: Format of the extension (e.g. .xls, .pdf, etc)
OwnerID: Id for the owner of the attachment
Body: If you are using an existing Attachment.csv file from your export you will need to add this column. It should be the absolute path to the attachment file's location on your local drive. (ex. C:\documents and settings\username\desktop\attachments\file.xls)

2. Open the Data Loader and set the batch size to 1. See Configure Data Loader for instructions on setting batch size.

3. Select the "Insert" command and login.

4. In the 'Select Salesforce Object' step, select the 'Show all Salesforce Objects' checkbox and then select "Attachments."

5. Choose the Attachment.csv file.

6. In the mapping step, map the following fields:

Parent ID
Owner ID
Body: Make sure to map the Body column which you created previously with the file extension. This is how you designate the file and location of the attachments to be inserted.

7. Click "OK" to proceed with the insert. It may take a few minutes but the attachments should be successfully uploaded to your Salesforce org.

See Also:
Uploading Attachments
How can I change the ParentId field for attachments via Data Loader?
How do I import notes and attachments?

promote demote