You're creating lots of PDFs and suddenly org storage is full
If your sales team generates signed contracts from Opportunity or Quote records, you probably see storage climb fast. You might not know which records hold the PDFs, whether Notes & Attachments or Files is better, or how large multi-page agreements affect limits.
This article gives concrete steps to estimate document volumes, pick the right storage option, and configure templates so DocuGen doesn't fill your org unexpectedly.
Estimate usage so you stop guessing about Salesforce storage limits
Start with a simple, hypothetical scenario and do the math — it reveals where the problem is.
Example: 200 renewals per month, each producing a 60-page signed agreement. If each signed PDF averages 3 MB, that’s about 600 MB per month and 7.2 GB per year. If drafts, copies, and versioning create two extra files per deal, triple that storage. It adds up fast.
Do this for your org:
- Count the number of template runs per month (manual sends, automation triggers, and re-sends).
- Estimate average file size per template (export a few to check real sizes).
- Multiply and add a buffer for retries, bundles, and stored drafts.
To find actual file sizes in Salesforce you can run a report against ContentVersion. A quick SOQL example:
SELECT ContentDocumentId, Title, FileType, ContentSize, CreatedDate
FROM ContentVersion
WHERE ContentLocation = 'S' -- Salesforce Files
ORDER BY CreatedDate DESC
LIMIT 200
That gives you recent Files with ContentSize in bytes. Use similar reports for Notes & Attachments where applicable.
Salesforce Files vs Notes and Attachments: which to choose
Short answer: use Files for larger documents and for long-term storage. Notes & Attachments has a hard cap and cannot be raised.
- Notes & Attachments is capped at 25 MB per file by Salesforce and cannot be raised. If a template can produce a document larger than 25 MB, it must go to Files.
- Savvy DocuGen can file the finished document to either Salesforce Files or Notes & Attachments on a per-template basis. That gives you control: smaller approval forms can stay in Notes & Attachments, but full signed contracts should go to Files.
- Salesforce Files supports larger documents up to the DocuGen cap (DocuGen will generate documents up to 40 MB).
Practical template and process choices that reduce storage growth
Make these simple configuration changes today:
- Pick Files vs Notes & Attachments per template. Keep large, rarely-changed signed PDFs in Files.
- Bundle templates where sensible. DocuGen can merge several templates into a single signature run — one bundled PDF beats storing three separate files for the same contract.
- Limit automatic triggers. If DocuGen is triggered on stage change, field change, and a button, you’ll unintentionally create duplicates. Use one trigger and require a final manual send for reissues.
- Store only the final signed document on the record. Where possible, avoid storing intermediate drafts or generated previews. Configure the template filing to attach the finished file only.
Retention, archiving, and housekeeping
You will still accumulate files. Decide a retention policy and stick to it.
- Short-term: keep the signed PDF on the record for active contracts (opportunities in pipeline, open contracts).
- Archive older signed documents off-platform or to a document management system if your company requires long retention. Export ContentVersion rows or use an automated integration to copy files periodically.
- Housekeeping: schedule a monthly check for duplicate files or multiple versions. A basic query on ContentDocumentLink shows how many records are linked to each document so you can identify orphans to delete.
Quick housekeeping SOQL examples
-- Find large Files
SELECT ContentDocumentId, Title, MAX(ContentSize) maxSize
FROM ContentVersion
GROUP BY ContentDocumentId, Title
HAVING MAX(ContentSize) > 2000000 -- > ~2 MB
-- Find how many records link to a document
SELECT ContentDocumentId, COUNT(RelationId)
FROM ContentDocumentLink
GROUP BY ContentDocumentId
HAVING COUNT(RelationId) = 1 -- could be orphaned if you expect multi-linking
What to watch for with DocuGen specifically
Savvy DocuGen gives you the knobs you need to control storage:
- File the finished document on the record, choosing Salesforce Files or Notes & Attachments per template.
- Bundle templates to reduce file count for the same signature run.
- DocuGen supports documents up to 40 MB; if your template can exceed 25 MB you must use Files (Notes & Attachments is capped at 25 MB).
- Use triggers (button, stage change, field change, or new file) deliberately — avoid overlapping automation that creates duplicates.
Simple checklist to reduce storage pain
- Estimate current monthly growth with a test sample of generated files.
- Set each template to Files or Notes & Attachments depending on size and retention.
- Bundle templates where possible to cut file count.
- Restrict triggers and store only the final signed PDF on the record.
- Implement a quarterly archive or export for older signed documents.
If you follow those steps you’ll know where every megabyte came from and why it’s there — which is the only way to keep Salesforce storage from surprising you.
Savvy DocuGen handles filing, bundling, and signature runs and works in sandboxes exactly as in production, so you can test your storage choices safely. Try Savvy DocuGen in your sandbox to validate template sizes and filing settings.
Read next