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:- Files (ContentVersion)
- Attachments
ContentDocumentIdFor Salesforce Files, use the ContentDocumentId (18-character ID starting with With Additional Columns (optional):
069).Example CSV:FileFetch only uses the ContentDocumentId column. Other columns are ignored but can help you organize your list.
Accepted Formats
FileFetch accepts various CSV formats:| Format | Example | Notes |
|---|---|---|
| With Header | ContentDocumentId 069... | Recommended - FileFetch auto-detects column |
| Without Header | 069... 069... | First line treated as ID |
| Multiple Columns | 069...,filename.pdf | Only ID column is used |
| Quoted Values | "069...","file.pdf" | Quotes are stripped automatically |
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 filesPasting 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
Invalid ID format
Invalid ID format
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.
Empty row
Empty row
Row 3: Empty or whitespace-only rowCause: CSV row contains no data or only whitespaceSolution: These rows are automatically skipped. No action needed.
ID type mismatch
ID type mismatch
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
No valid IDs found
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
CSV Error Banner
When FileFetch encounters parsing or retrieval errors, a yellow warning banner appears above the results table: Example:Example CSV Files
Minimal Files CSV
Detailed Files CSV
Minimal Attachments CSV
Salesforce Report Export
If you export a Salesforce report as CSV, you can use it directly: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
| Aspect | Limit | Notes |
|---|---|---|
| File Size | 5MB max | CSV file size limit |
| Number of IDs | No hard limit | Processed in batches of 200 |
| ID Format | 18-character only | 15-character IDs not supported |
| Mixed ID Types | Not supported | All IDs must be same type (Files OR Attachments) |
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 Details → Formatted ReportSave as CSV
5
Upload to FileFetch
Use the CSV file in FileFetch’s CSV Import feature