Google Drive + Salesforce

Connect Google Drive and Salesforce to Automate Document Management Across Your Sales Workflow

Keep your CRM records and cloud files in sync — no manual uploads, broken links, or version chaos.

Why integrate Google Drive and Salesforce?

Google Drive and Salesforce are two of the most-used tools in any modern sales org, yet they usually operate in separate silos. Reps waste time manually attaching proposals, contracts, and presentations to Salesforce records — and critical documents frequently go missing or fall out of date. Integrating Google Drive with Salesforce on tray.ai lets your team automate document workflows, ensure every deal has the right files attached, and keep your CRM as the single source of truth.

Automate & integrate Google Drive & Salesforce

Use case

Auto-Create Google Drive Folders for New Salesforce Opportunities

Every time a new opportunity is created in Salesforce, tray.ai automatically provisions a structured Google Drive folder — with subfolders for proposals, contracts, and correspondence. The folder link is written back to the Salesforce opportunity record so reps can access it immediately. No more time spent manually creating and naming folders for every deal in the pipeline.

Use case

Attach Signed Contracts from Google Drive to Salesforce Accounts

When a finalized or signed contract is uploaded to a designated Google Drive folder, tray.ai automatically attaches it to the corresponding Salesforce account or opportunity. The workflow can match files to records using naming conventions, opportunity IDs, or account names. Sales ops teams no longer need to manually chase down signed documents and upload them to Salesforce.

Use case

Sync Salesforce Account Data to Auto-Populate Google Drive Documents

With tray.ai, you can pull live Salesforce account and contact data to automatically populate Google Docs templates — proposals, statements of work, onboarding guides. When an opportunity reaches a specific stage, the workflow generates a pre-filled document and saves it to the account's Drive folder. Fewer data entry errors, faster document creation.

Use case

Notify Sales Teams When Important Documents Are Uploaded to Drive

When a prospect or internal team member uploads a critical file — a redlined contract, a technical questionnaire — to a shared Google Drive folder, tray.ai sends an instant notification to the relevant Salesforce opportunity owner via Slack or email. The Salesforce activity log updates automatically to reflect the new document. No one misses an update buried in a shared drive.

Use case

Archive Closed-Lost Salesforce Opportunities with Drive File Backup

When an opportunity is marked Closed-Lost in Salesforce, tray.ai automatically archives the associated Google Drive folder to a designated archive location and appends the closure date and reason to a log document. Active Drive folders stay clean, and all related assets are preserved for future reference. Compliance teams get a structured record of every deal regardless of outcome.

Use case

Generate and Store Salesforce Reports as Google Drive Spreadsheets

tray.ai can run Salesforce reports on a schedule — weekly pipeline reviews, monthly close rate summaries, quarterly revenue snapshots — and automatically export the results as Google Sheets saved in a shared Drive folder. Stakeholders always have access to current reports without needing Salesforce licenses or manual exports. Drive's version history also provides a built-in audit trail.

Use case

Trigger Salesforce Opportunity Stage Updates When Proposals Are Shared

When a Google Drive proposal document is shared externally with a prospect, tray.ai detects the share event and automatically advances the linked Salesforce opportunity to the 'Proposal Sent' stage and logs a timestamped activity. Sales managers get accurate pipeline stage data without relying on reps to manually update records, which means better forecast accuracy and fewer CRM hygiene issues.

Get started with Google Drive & Salesforce integration today

Google Drive & Salesforce Challenges

What challenges are there when working with Google Drive & Salesforce and how will using Tray.ai help?

Challenge

Matching Google Drive Files to the Correct Salesforce Records

Without a direct native link between Drive and Salesforce, reliably matching a file to the right account, contact, or opportunity is genuinely hard — especially when hundreds of deals are active and naming conventions vary across the team.

How Tray.ai Can Help:

tray.ai's flexible data mapping and conditional logic let you define multiple matching strategies — opportunity IDs embedded in file names, folder hierarchy patterns, or metadata fields. When a match is ambiguous, the workflow falls back gracefully, routing edge cases to a Slack alert or a Salesforce task for manual review.

Challenge

Avoiding Duplicate File Attachments in Salesforce

When integrations run on a recurring schedule or fire on multiple events, the same Google Drive file can end up attached to a Salesforce record more than once, cluttering the Files section and making it harder for reps to find the latest version.

How Tray.ai Can Help:

tray.ai supports deduplication logic at the workflow level — checking whether a file with the same name or Drive file ID already exists as a Salesforce ContentDocument before creating a new attachment — so file syncing stays idempotent even when workflows re-run.

Challenge

Handling Google Drive Folder Permissions for Salesforce Users

Salesforce users may not have Google accounts or the right Drive sharing permissions. That means writing a Drive folder URL to a Salesforce record is useless if the rep clicking the link gets an access-denied error — a frustrating gap that's easy to miss when you're first setting up the integration.

How Tray.ai Can Help:

tray.ai can automatically set Google Drive sharing permissions as part of the folder creation workflow — granting view or edit access to the Salesforce opportunity owner's email address the moment the folder is created — so every rep has immediate access to their deal files.

Challenge

Keeping Drive Folder Links Accurate When Salesforce Records Are Merged or Renamed

Salesforce records get merged, renamed, and reassigned all the time. When that happens, Drive folder links stored in custom fields can become orphaned or point to incorrectly named folders — which erodes rep trust in the integration pretty quickly.

How Tray.ai Can Help:

tray.ai can listen for Salesforce record merge and update events and trigger a Drive folder rename or re-link workflow automatically, keeping the Drive folder name and the Salesforce record name in sync and ensuring custom URL fields always point to the correct folder.

Challenge

Managing Large File Volumes Without Hitting API Rate Limits

Enterprise sales teams may upload dozens of files per day across hundreds of active opportunities. Integrations that process every Drive event synchronously can burn through Google Drive API quotas or Salesforce API call limits fast — causing workflows to fail silently or produce incomplete data.

How Tray.ai Can Help:

tray.ai's built-in rate limiting controls, retry logic, and asynchronous workflow execution let high-volume file sync operations run in batches, with automatic backoff and error alerting so no file events are dropped even during bursts of activity.

Start using our pre-built Google Drive & Salesforce templates today

Start from scratch or use one of our pre-built Google Drive & Salesforce templates to quickly solve your most common use cases.

Google Drive & Salesforce Templates

Find pre-built Google Drive & Salesforce solutions for common use cases

Browse all templates

Template

New Salesforce Opportunity → Create Google Drive Folder + Write Back Link

Automatically creates a structured Google Drive folder hierarchy when a new Salesforce opportunity is created, then writes the folder URL back to a custom field on the opportunity record so reps have one-click access to all deal documents.

Steps:

  • Trigger: New opportunity created in Salesforce
  • Create a named Google Drive folder using the opportunity name and ID
  • Create subfolders (Proposals, Contracts, Correspondence) within the parent folder
  • Write the Google Drive folder URL back to a custom URL field on the Salesforce opportunity
  • Log an activity on the Salesforce opportunity confirming folder creation

Connectors Used: Salesforce, Google Drive

Template

Google Drive File Upload → Attach to Salesforce Record

Monitors a specified Google Drive folder for new file uploads and automatically attaches those files to the matching Salesforce opportunity or account record, using the file name or metadata to identify the correct CRM record.

Steps:

  • Trigger: New file uploaded to a monitored Google Drive folder
  • Parse the file name to extract the Salesforce opportunity ID or account name
  • Search Salesforce for the matching record using extracted metadata
  • Attach the file to the identified Salesforce record as a Salesforce File or ContentDocument
  • Post a Chatter notification on the Salesforce record to alert the opportunity owner

Connectors Used: Google Drive, Salesforce

Template

Salesforce Stage Change → Generate Google Doc from Template

When a Salesforce opportunity reaches a defined stage (e.g., 'Proposal' or 'Negotiation'), this template pulls relevant CRM data and populates a Google Docs template, saving the generated document to the deal's Drive folder and logging the action in Salesforce.

Steps:

  • Trigger: Salesforce opportunity stage updated to a configured value
  • Fetch opportunity, account, and contact details from Salesforce
  • Copy a master Google Docs template to the opportunity's Drive folder
  • Replace template placeholders with live Salesforce field values
  • Update the Salesforce opportunity with the generated document link and log an activity

Connectors Used: Salesforce, Google Drive

Template

Scheduled Salesforce Report Export → Google Sheets in Drive

Runs a configured Salesforce report on a recurring schedule and exports the results as a new or updated Google Sheet in a shared Drive folder, making CRM data accessible to stakeholders without Salesforce licenses.

Steps:

  • Trigger: Scheduled time interval (daily, weekly, or monthly)
  • Execute the specified Salesforce report via the Salesforce API
  • Format the report results into rows and columns
  • Create a new Google Sheet in the designated Drive folder or update an existing one
  • Share the Google Sheet with configured stakeholder email addresses

Connectors Used: Salesforce, Google Drive

Template

Salesforce Closed-Lost Opportunity → Archive Google Drive Folder

When a Salesforce opportunity is marked Closed-Lost, this template moves the associated Google Drive folder to an archive directory, appends closure metadata to a log sheet, and updates the Salesforce record with the archive path for future reference.

Steps:

  • Trigger: Salesforce opportunity stage updated to Closed-Lost
  • Retrieve the Google Drive folder URL from the Salesforce opportunity custom field
  • Move the Drive folder to a designated archive parent folder
  • Append a row to a Google Sheets archive log with deal name, owner, close date, and loss reason
  • Update the Salesforce opportunity with the new archived folder path

Connectors Used: Salesforce, Google Drive

Template

Google Drive File Share Event → Advance Salesforce Opportunity Stage

Detects when a proposal or contract document in Google Drive is shared externally and automatically updates the corresponding Salesforce opportunity stage and logs a timestamped activity to keep the pipeline accurate without manual rep intervention.

Steps:

  • Trigger: File sharing permissions updated on a monitored Google Drive document
  • Identify whether the share target is an external (non-company) email address
  • Extract the associated Salesforce opportunity ID from file metadata or naming convention
  • Update the Salesforce opportunity stage to the configured value (e.g., Proposal Sent)
  • Create a Salesforce activity log entry with the share timestamp and recipient domain

Connectors Used: Google Drive, Salesforce