Back to the blog

Manage Salesforce file storage limits for document generation

Storage & Limits 6 min read 2 September 2026

The problem: generated documents hit your Salesforce file storage limits

If you use Salesforce to produce contracts, quotes or renewals, every signed PDF lives in your org and counts against storage. Those documents add up: a 60-page agreement turned into a 2–4 MB PDF, multiplied by hundreds of transactions a month, is the kind of growth that breaks reporting or triggers a storage buy.

This post explains where document generation storage goes, how Salesforce storage types behave, and specific steps you can take today to keep storage under control while still keeping signed documents where your users expect them.

How Salesforce file storage limits bite your document process

Salesforce stores files in different places and they don't behave the same. Two facts to remember:

  • Files (ContentVersion/ContentDocument) are the normal place for modern attachments and support larger file handling.
  • Notes and Attachments has a hard cap of 25 MB per file in Salesforce and cannot be raised; Files allow larger documents up to product limits.

That means a DocuGen-generated PDF that is 30 MB cannot be saved to Notes and Attachments and must be saved to Files. For admins, the mismatch shows up when users upload or generate many large PDFs and suddenly the org storage starts shrinking fast.

Hypothetical scenario to make it real

Imagine a sales team that generates 200 renewal agreements per month. Each agreement is 60 pages and becomes a 3 MB signed PDF. That's 600 MB per month added to your org just from renewals—7.2 GB in a year. If you also keep unsigned drafts and multiple versions, the number grows further. These are hypothetical figures but they illustrate why you need a plan.

Document generation storage: Files vs Notes and Attachments

Choose where DocuGen writes the finished document. The choice matters:

  • Files (ContentVersion) - Best for large documents, modern sharing, and search. Files handle larger sizes and can be linked to multiple records.
  • Notes and Attachments - Legacy; capped at 25 MB and limited in functionality. Avoid for generated documents, especially long agreements or bundles.

For generated documents larger than 25 MB, or if you expect high volume, always configure your templates to save to Files. Savvy DocuGen supports saving per template to either Files or Notes and Attachments, so you can pick per-document behaviour.

Practical steps to control document generation storage

These are admin-level actions you can take in clicks or small automations. No vendor claims—just simple rules that work.

1. Pick Files for production templates

  • Set DocuGen templates that produce final signed PDFs to save to Files. Use Notes and Attachments only for tiny, infrequent exports.
  • Files let you attach the same document to an Account and an Opportunity without duplicate ContentVersion rows.

2. Bundle templates where it reduces duplicates

If you currently run separate signature runs for a cover letter, contract and appendix, consider bundling them into a single signature run. Bundling keeps the number of saved signed PDFs down because one signed bundle can replace three separate files.

3. Apply a naming and linking convention

Make Documents easy to find and purge when appropriate. Use predictable names and attach files to the primary record (Opportunity, Contract or Account) so reports and flows can find them.

// Example ContentVersion filename convention
Account_12345_Opportunity_67890_Renewal_2026-08-01.pdf

4. Report on large and old files

Create a report or use SOQL to find the biggest ContentVersions. A simple query helps you spot storage hogs:

SELECT Id, Title, ContentSize, FileType, CreatedDate, FirstPublishLocationId
FROM ContentVersion
WHERE ContentSize > 5000000
ORDER BY ContentSize DESC
LIMIT 50

Use the results to decide which files to archive off-platform or delete after retention rules are met.

5. Implement a retention policy (human or Flow)

  • Decide how long signed documents must stay in Salesforce. For many teams, active contracts stay; older drafts get archived.
  • Use a scheduled Flow to flag or unshare files older than X months, then review for deletion or export. Keep users and legal informed.

6. Avoid storing drafts you don't need

Don't keep every intermediate version. Configure DocuGen to save only final signed PDFs where possible, or to replace the draft with the signed version rather than keeping both.

When to consider moving documents outside Salesforce

If your business requires long-term archival of very large documents or hundreds of thousands of agreements, you should evaluate off-platform archival. That requires an integration or an export process. If you go that route, keep a minimal reference in Salesforce (record a link, metadata, and retention status) so users still find the document without it consuming org storage.

How Savvy DocuGen fits this problem

Savvy DocuGen writes finished documents back to the record and supports saving either to Salesforce Files or Notes and Attachments per template. It can bundle multiple templates into one signature run so you generate fewer final files, and it handles signed documents up to 40 MB when saved as Files. Because DocuGen works in sandboxes exactly as in production and connects via an authorised connection (no managed package to install), you can test your storage choices before you flip them on for users.

If you want to experiment in a safe place, try DocuGen in a sandbox and configure a single template to save to Files, run a bundle, and inspect the ContentVersion rows it creates. That's the fastest way to see storage behaviour for your exact templates and data model.

Read next