Skip to main content

Overview

CSV Import allows you to bulk-select files for export by uploading or pasting a CSV file containing file IDs. This is ideal when you have a pre-determined list of files to export, such as from a report or external system.
CSV Import bypasses query building entirely - you provide the specific file IDs you want to export, and FileFetch retrieves only those files.

When to Use CSV Import

CSV Import is perfect for:

Report-Based Exports

Export files from a Salesforce report or external list

Selective Exports

Export specific files you’ve manually identified

Integration Workflows

Automate exports based on external system data

Large Batch Jobs

Export more than 2000 files (SOQL limit) by providing IDs directly

CSV Format Requirements

Your CSV file must contain a column with file IDs. FileFetch automatically detects the ID type:
ContentDocumentIdFor Salesforce Files, use the ContentDocumentId (18-character ID starting with 069).Example CSV:
ContentDocumentId
069xx000000ABCDEA4
069xx000000EFGHEA4
069xx000000IJKLEA4
With Additional Columns (optional):
ContentDocumentId,FileName,Description
069xx000000ABCDEA4,Contract_2024.pdf,Annual contract
069xx000000EFGHEA4,Invoice_Q1.xlsx,Q1 invoices
069xx000000IJKLEA4,Photo.jpg,Product photo
FileFetch only uses the ContentDocumentId column. Other columns are ignored but can help you organize your list.

Accepted Formats

FileFetch accepts various CSV formats:
FormatExampleNotes
With HeaderContentDocumentId
069...
Recommended - FileFetch auto-detects column
Without Header069...
069...
First line treated as ID
Multiple Columns069...,filename.pdfOnly ID column is used
Quoted Values"069...","file.pdf"Quotes are stripped automatically
ID Format: All IDs must be 18-character Salesforce IDs. 15-character IDs are not supported. FileFetch validates each ID and reports errors for invalid formats.

Uploading a CSV File

1

Switch to CSV Mode

In the Query Editor, click the CSV tab to switch from SOQL to CSV input mode
2

Upload CSV File

Click Upload CSV File buttonSelect your .csv file from your computerFileFetch will:
  • Read the file content
  • Auto-detect the ID column
  • Parse all valid IDs
  • Display the content in the text area
3

Review Parsed Content

The CSV content appears in the editorYou can edit it directly if needed
4

Load Files

Click Load Files (or press ⌘/Ctrl + Enter)FileFetch will process the CSV and fetch matching files

Pasting CSV Content

Alternatively, paste CSV content directly:
1

Switch to CSV Mode

Click the CSV tab in the Query Editor
2

Paste Content

Click in the CSV text areaPaste your CSV content (⌘/Ctrl + V)Content can be:
  • Copied from Excel/Google Sheets
  • Exported from a Salesforce report
  • Generated from another system
3

Load Files

Click Load Files to process the IDs

CSV Processing

When you load a CSV, FileFetch performs the following:
1

Parse CSV

FileFetch reads the CSV and extracts IDs:
  • Detects header row (if present)
  • Identifies ID column (ContentDocumentId or Id)
  • Validates ID format (18-character Salesforce ID)
  • Filters out invalid rows
2

Detect ID Type

FileFetch auto-detects the ID type based on prefix:
  • 069… → ContentDocumentId (Files)
  • 00P… → Attachment ID (Attachments)
The detected type must match your selected Export Type (Files vs Attachments). If there’s a mismatch, FileFetch will display an error.
3

Batch Query

FileFetch queries Salesforce in batches of 200 IDs:
  • Builds SOQL query: WHERE ContentDocumentId IN (...)
  • Fetches file metadata for each batch
  • Combines results from all batches
4

Display Results

Matching files appear in the results tableAny missing or inaccessible files are reported as errors

Error Handling

FileFetch validates your CSV and reports issues:

CSV Parsing Errors

Row 5: ‘12345’ - Invalid ID format (must be 18 characters)Cause: ID is not a valid 18-character Salesforce IDSolution: Ensure all IDs are 18 characters long. If you have 15-character IDs, convert them to 18-character format in Salesforce first.
Row 3: Empty or whitespace-only rowCause: CSV row contains no data or only whitespaceSolution: These rows are automatically skipped. No action needed.
CSV contains ContentDocumentIds, but you’re in Attachments modeCause: CSV has Files IDs (069…) but Export Type is set to AttachmentsSolution: Switch Export Type to Files in the Export Configuration panel
No valid IDs found in CSVCause: CSV doesn’t contain any recognizable Salesforce IDsSolution:
  • Check that IDs are in the correct format
  • Ensure CSV has a column with IDs
  • Verify IDs start with 069 (Files) or 00P (Attachments)

File Not Found Errors

After loading the CSV, you may see warnings for files that couldn’t be retrieved: File not found or no access: 069xx000000ABCDEA4 Possible Causes:
  • File was deleted from Salesforce
  • You don’t have permission to access the file
  • ID is incorrect or doesn’t exist
  • File is in a different Salesforce org
What Happens: FileFetch skips missing files and continues with the rest. You can export the files that were successfully found.

CSV Error Banner

When FileFetch encounters parsing or retrieval errors, a yellow warning banner appears above the results table: Example:
⚠️ 5 rows had issues

Row 2: "invalid-id" - Invalid ID format
Row 7: "069xx000000ZZZZZ" - File not found or no access
Row 12: Empty or whitespace-only row
... and 2 more
Click the × to dismiss the banner. The errors don’t prevent you from exporting files that were successfully loaded.

Example CSV Files

Minimal Files CSV

ContentDocumentId
069xx000000ABCDEA4
069xx000000EFGHEA4
069xx000000IJKLEA4
069xx000000MNOPEA4

Detailed Files CSV

ContentDocumentId,FileName,Category,CreatedDate
069xx000000ABCDEA4,Contract_Acme.pdf,Contracts,2024-01-15
069xx000000EFGHEA4,Invoice_January.xlsx,Invoices,2024-02-01
069xx000000IJKLEA4,Product_Photo.jpg,Media,2024-03-10
069xx000000MNOPEA4,Proposal_Q2.docx,Proposals,2024-04-05

Minimal Attachments CSV

Id
00Pxx000000ABCDEA4
00Pxx000000EFGHEA4
00Pxx000000IJKLEA4

Salesforce Report Export

If you export a Salesforce report as CSV, you can use it directly:
"File Name","Content Document ID","Created Date","Owner"
"Annual Report.pdf","069xx000000ABCDEA4","1/15/2024","John Smith"
"Q1 Results.xlsx","069xx000000EFGHEA4","2/1/2024","Jane Doe"
"Product Specs.docx","069xx000000IJKLEA4","3/10/2024","Bob Johnson"
FileFetch will automatically detect the “Content Document ID” column.

Best Practices

Validate IDs First

Test with a small CSV (5-10 IDs) before processing large batches

Include Headers

Use column headers for clarity and easier debugging

Keep Extra Columns

Additional columns (names, dates) help you organize without affecting FileFetch

Check Error Messages

Review parsing errors and fix invalid rows before re-uploading

Limitations

AspectLimitNotes
File Size5MB maxCSV file size limit
Number of IDsNo hard limitProcessed in batches of 200
ID Format18-character only15-character IDs not supported
Mixed ID TypesNot supportedAll IDs must be same type (Files OR Attachments)
If you need to export both Files and Attachments, you must run two separate exports with different CSVs.

Exporting from Salesforce Reports

To create a CSV from a Salesforce report:
1

Create Report

In Salesforce, create a report on:
  • Files: Content Document report type
  • Attachments: Attachment report type
2

Add ID Field

Add the ID field to your report columns:
  • Files: Content Document ID
  • Attachments: Attachment ID
3

Apply Filters

Filter the report to show only files you want to export
4

Export Report

Click Export DetailsFormatted ReportSave as CSV
5

Upload to FileFetch

Use the CSV file in FileFetch’s CSV Import feature

Next Steps