New: CodeSierra Studio turns your policies and SOPs into narrated video courses. Join the private beta →
HomeSolutions OverviewAll solutionsSalesforce ImplementationSalesforce ConsultingSalesforce DevelopmentSalesforce IntegrationSalesforce Managed ServicesAgentforce ImplementationSalesforce CustomizationSalesforce Data MigrationCPQ & Revenue CloudReports & DashboardsExperience Cloud PortalsHire a Salesforce DeveloperIndustries We ServeAll industriesHealthcareFinancial ServicesManufacturingRetail & E-commerceReal EstateLogisticsNon-ProfitEducationMoreCodeSierra StudioCase StudiesPricingCoursesBlogCareersAbout UsGet Started
Consultant organising documents with an abstract file browser inside a CRM layout
Professional Services

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.

Discuss a similar project
Drive + DropboxStorage connected
Custom LWCFiles on records
Per-user OAuthAccess respected
Professional ServicesIndustry
The client

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.

What was not working

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.

Our solution

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.

Solution architecture

Salesforce, Google Drive and Dropbox integration architecture

Salesforce UI
  • Account page
  • Opportunity page
  • Document LWC
Salesforce logic
  • Apex service
  • Document reference object
  • Salesforce Flow
  • Sync job
Auth
  • Per-user OAuth 2.0
  • Token refresh
  • Scope limits
Storage
  • Google Drive API
  • Dropbox API
The document LWC calls Apex, which uses per-user OAuth to reach Google Drive and Dropbox; a reference object links files to records.
What changed

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.
Answers

Questions about this project