
Google Drive and Dropbox files surfaced inside Salesforce records
Contracts and project files sat in Google Drive and Dropbox with no link to the CRM. We built an LWC that shows, searches and uploads them on Salesforce records, with each user's own access.
Project overview
Our client, a professional services firm, keeps contracts, proposals and project files in Google Drive and Dropbox while managing clients in Salesforce. Staff switched between tools to find files, copies multiplied, and nothing linked a document to the account or opportunity it belonged to.
We built an integration that brings Google Drive and Dropbox files into Salesforce records, using each user's own access, so people find the right document from the record they are already working on.
The challenge
Disconnected storage
Files had no consistent link to CRM records.
Manual searching
Staff hunted through storage platforms for client documents.
Duplicate copies
The same file existed in several places and versions drifted.
No document view on records
Accounts, opportunities and projects showed no related files.
Access control
Salesforce users must only see files the storage platform allows them to see.
What we built
Document panel on Salesforce records
A custom Lightning Web Component on account, opportunity and project pages.
- Lists documents linked to the record
- Searches the connected storage
- Previews supported file types
- Opens files in Google Drive or Dropbox
- Uploads files and creates folders where allowed
- Shows file metadata
Google Drive integration
File search, folder creation, upload, metadata retrieval, authorised preview and linking to Salesforce records through the Google Drive API.
Dropbox integration
File and folder search, metadata, upload, folder creation, sharing links and record linking through the Dropbox API.
Document reference object
A custom object stores the link between a record and a file: record, external file ID, provider, name, MIME type, URL, last sync time, owner and integration status. Links use the provider's file ID, never the file name.
Authentication and access
OAuth 2.0 per user with secure token storage, token refresh, minimum scopes, access validation and revocation handling. Salesforce permissions never override the storage platform's own permissions.
Sync and automation
Scheduled sync keeps metadata current and flags moved, deleted or broken files. Flow creates a project folder when an opportunity closes, organises folders for new accounts, and reminds users when required documents are missing.
Salesforce, Google Drive and Dropbox integration architecture
- Account page
- Opportunity page
- Document LWC
- Apex service
- Document reference object
- Salesforce Flow
- Sync job
- Per-user OAuth 2.0
- Token refresh
- Scope limits
- Google Drive API
- Dropbox API
Results
- Staff open the right file from the Salesforce record they are working on.
- Files link to records by provider file ID, so renames do not break them.
- Each user sees only what Google Drive or Dropbox already lets them see.
- Project folders are created automatically when deals close.
- Broken or moved file links are flagged by the sync job.


