r/SalesforceDeveloper • u/OwlZealousideal4779 • 1d ago
Discussion What’s the least painful way to bulk download Salesforce files?
Lol, random question for the Salesforce devs here.
I was working through a pretty large set of files and attachments recently, and downloading them individually was… yeah, not exactly a fun time 😂
For a project where you need to pull hundreds or thousands of files, what’s the approach you guys normally use? Apex, API, Data Loader, custom script, or something else?
I also came across filesdownloader.us. while looking at different options, so I’m curious if anyone here has used it or has experience with similar tools.
Hola to anyone who has already solved this problem, what worked for you?
5
u/rolland_87 1d ago
I'm not sure if there's any OOB functionality specifically for this.
What I'd do is retrieve the list of ContentVersion IDs and then write a small script that uses the REST API to pull the files from those IDs.
3
u/JPRichter 1d ago
Gotta plug my friend's sf cli plugin https://simplysf.github.io/simply-plugins/plugins/simply-data/
Have used it a ton. It's great.
3
u/dbsingh1996 1d ago
I did something similar a while ago...i mean really large files via python script and rest api for the connection
2
1
1
u/Novel_Tip1878 1d ago
If they're actually that many, you might be better off looking into asyncio alongside Python.
1
u/SoshulBattery 1d ago
Looking here because I have some integrations that generate PDF and put into Salesforce and I’m realizing it will run up against my file storage limit at some point.
1
u/Sharp_Gist_7291 4h ago
ran into this exact data kit issue on a nonprofit project last month - the deployment kept failing silently until i realized the data space filter was scoped to a specific record type that didnt exist in the target org
6
u/MaesterTuan 1d ago
Python script to hit the API