Google BigQuery + Salesforce
Connect Google BigQuery and Salesforce to Make Smarter Sales Decisions
Bring your warehouse analytics and CRM data together to unlock revenue intelligence at scale.

Why integrate Google BigQuery and Salesforce?
Google BigQuery and Salesforce are two of the most powerful platforms in the modern data stack — one built for massive-scale analytics, the other for managing customer relationships and revenue pipelines. Together, they give you a complete picture of your business: where deals stand, how customers behave, and where growth opportunities are hiding. Connecting BigQuery with Salesforce lets revenue teams act on warehouse insights directly inside their CRM, while CRM activity feeds back into your analytical models.
Automate & integrate Google BigQuery & Salesforce
Use case
Sync Salesforce CRM Data into BigQuery for Advanced Reporting
Automatically push Salesforce objects — opportunities, accounts, contacts, and activities — into BigQuery on a scheduled or real-time basis. Your data team gets a continuously updated warehouse table for building dashboards, attribution models, and revenue forecasts, with no manual exports or brittle CSV workflows.
Use case
Push BigQuery Predictive Scores Back into Salesforce
Surface machine learning model outputs — churn probability, upsell propensity, lead quality scores — directly on Salesforce Account and Lead records. When BigQuery scores are updated, tray.ai writes them back to custom Salesforce fields automatically, so reps always work from the freshest intelligence.
Use case
Enrich Salesforce Accounts with Product Usage Data from BigQuery
Most companies store product telemetry and usage events in BigQuery. By syncing aggregated usage metrics — feature adoption, session frequency, license utilization — into Salesforce Account fields, customer success and sales teams can spot expansion opportunities and at-risk accounts without leaving the CRM.
Use case
Build a Unified Customer 360 View in BigQuery
Combine Salesforce CRM data with data from other systems — marketing platforms, billing tools, support tickets — by routing everything into BigQuery through tray.ai. Your data team gets a comprehensive Customer 360 dataset they can query to answer complex questions about the full customer lifecycle.
Use case
Automate Salesforce-Driven Pipeline and Forecast Reporting in BigQuery
Keep your BigQuery pipeline and forecast tables in sync with Salesforce opportunity stage changes in near real-time. When a deal moves stages, closes, or gets updated with a new amount, tray.ai updates the record in BigQuery — so financial models and forecast dashboards stay current.
Use case
Load BigQuery Market and Firmographic Data into Salesforce Leads
Use BigQuery as a staging area for enriched market data, third-party firmographics, or intent signals, then push relevant attributes into Salesforce Lead and Account records via tray.ai. Your CRM stays enriched without reps having to manually research and update records.
Use case
Trigger Salesforce Tasks and Alerts from BigQuery Anomalies
Set up tray.ai workflows that monitor BigQuery query results on a schedule and create Salesforce tasks, update opportunity fields, or fire alerts when defined thresholds are crossed — for example, when an account's product usage drops below a retention threshold or a deal has gone quiet for too long.
Get started with Google BigQuery & Salesforce integration today
Google BigQuery & Salesforce Challenges
What challenges are there when working with Google BigQuery & Salesforce and how will using Tray.ai help?
Challenge
Schema Drift Between Salesforce and BigQuery Tables
Salesforce admins frequently add, rename, or remove custom fields. When this happens, pipelines that map Salesforce fields to BigQuery columns can silently break or produce incomplete data, causing analytics and scoring models to fail or return misleading results.
How Tray.ai Can Help:
Tray.ai's visual workflow builder makes field mappings explicit and easy to update without code. When a Salesforce schema change breaks something, operators can quickly remap fields in the connector configuration and redeploy — no brittle transformation scripts, no waiting on engineering.
Challenge
Handling Salesforce API Rate Limits During Large Data Syncs
Salesforce enforces strict API call limits, and syncing large volumes of Accounts, Contacts, and Opportunities can burn through daily limits fast — especially when multiple integrations share the same connected app. Syncs fail partway through, leaving BigQuery tables in an inconsistent state.
How Tray.ai Can Help:
Tray.ai natively supports Salesforce's Bulk API for high-volume operations, which dramatically cuts the number of API calls large syncs require. Built-in retry logic and rate limit handling mean sync jobs resume gracefully rather than failing silently, protecting the integrity of your BigQuery dataset.
Challenge
Bidirectional Data Conflicts and Duplicate Records
When data flows in both directions — Salesforce to BigQuery and BigQuery back to Salesforce — update loops and conflicts are easy to create. A record gets overwritten by stale data from the other system, and without clear ownership rules, data quality degrades fast.
How Tray.ai Can Help:
Tray.ai lets you build conditional logic and deduplication steps directly into your workflows. You can define which system owns each field, add timestamp-based conflict resolution, and include lookup steps that stop Salesforce fields from being overwritten with older BigQuery data.
Challenge
Latency and Freshness Requirements for Sales Rep Workflows
Sales reps need current data in Salesforce — scores, health metrics, enrichment. A nightly batch sync won't cut it if a rep is walking into a renewal call and the risk score they're looking at is 24 hours old. Near-real-time sync solves that, but adds real complexity around triggers and event-driven architecture.
How Tray.ai Can Help:
Tray.ai supports both scheduled and event-driven trigger models, so you can mix batch and real-time patterns in the same workflow. High-priority signals like churn risk score updates can be pushed to Salesforce in near real-time, while high-volume historical syncs run on an efficient schedule — the right data when it actually matters.
Challenge
Data Type and Format Incompatibilities Between Platforms
BigQuery and Salesforce have fundamentally different data type systems. BigQuery uses TIMESTAMP and RECORD types; Salesforce has its own date, picklist, and lookup field formats. Naive field mapping produces type errors, truncated values, or rejected records that are painful to debug.
How Tray.ai Can Help:
Tray.ai has a rich set of built-in data transformation operators — date formatting, type casting, JSON flattening — that sit between your source and destination connectors. You can normalize BigQuery TIMESTAMP values to Salesforce-compatible date strings, explode nested RECORD fields, and validate data before it ever reaches Salesforce, which cuts pipeline errors significantly.
Start using our pre-built Google BigQuery & Salesforce templates today
Start from scratch or use one of our pre-built Google BigQuery & Salesforce templates to quickly solve your most common use cases.
Google BigQuery & Salesforce Templates
Find pre-built Google BigQuery & Salesforce solutions for common use cases
Template
Scheduled Salesforce Opportunities Sync to BigQuery
On a configurable schedule, this template queries all updated Salesforce Opportunity records and upserts them into a designated BigQuery table, keeping a continuously fresh dataset for pipeline analysis and forecasting.
Steps:
- Trigger on a time-based schedule (e.g., every hour or daily)
- Query Salesforce for Opportunities modified since the last sync timestamp
- Transform and map Salesforce fields to the target BigQuery schema
- Upsert records into the BigQuery Opportunities table using the Opportunity ID as the key
Connectors Used: Salesforce, Google BigQuery
Template
BigQuery Lead Score to Salesforce Lead Field Sync
Reads lead scoring results from a BigQuery table and writes the latest scores back to matching Salesforce Lead records, so reps can prioritize outreach based on data model outputs.
Steps:
- Trigger on a schedule or when a BigQuery scoring job completes
- Query the BigQuery lead scores table for records updated in the current window
- Look up matching Salesforce Lead records by email or external ID
- Update the Lead Score custom field in Salesforce with the latest BigQuery value
Connectors Used: Google BigQuery, Salesforce
Template
Salesforce Account and Contact Full Export to BigQuery
Runs a full or incremental export of Salesforce Account and Contact objects into BigQuery, creating a reliable CRM dataset for customer 360 analytics, segmentation, and machine learning feature engineering.
Steps:
- Trigger on a daily or weekly schedule for full sync, or on record change events for incremental
- Bulk query Salesforce Accounts and Contacts using the Salesforce Bulk API
- Flatten and normalize nested Salesforce data structures for BigQuery compatibility
- Load records into partitioned BigQuery tables with a timestamp for historical tracking
Connectors Used: Salesforce, Google BigQuery
Template
BigQuery Churn Risk Score to Salesforce Account Alert
Monitors a BigQuery churn risk scoring table and automatically updates Salesforce Account records with risk tiers, then creates follow-up tasks for account owners when a risk threshold is exceeded.
Steps:
- Run a scheduled BigQuery query to retrieve accounts with updated churn risk scores
- Map risk score ranges to risk tier labels (e.g., Low, Medium, High, Critical)
- Update the Churn Risk Tier custom field on matching Salesforce Account records
- Create a Salesforce Task assigned to the Account Owner when risk tier is High or Critical
Connectors Used: Google BigQuery, Salesforce
Template
Real-Time Salesforce Closed-Won Deal Event to BigQuery
Listens for Salesforce Opportunity stage changes to Closed Won and immediately writes a deal record into BigQuery, enabling real-time revenue recognition tracking and commission calculation pipelines.
Steps:
- Trigger on Salesforce Opportunity field change event when Stage equals Closed Won
- Retrieve full Opportunity details including Account, Amount, and Close Date
- Insert a new row into the BigQuery closed deals table with a precise event timestamp
- Optionally trigger downstream workflows such as notifying finance or updating a revenue dashboard
Connectors Used: Salesforce, Google BigQuery
Template
BigQuery Product Usage Metrics to Salesforce Account Health Score
Aggregates product usage telemetry stored in BigQuery and syncs a computed health score to Salesforce Account records, giving customer success teams real-time visibility into account engagement.
Steps:
- Schedule a BigQuery query to aggregate usage metrics per account over a rolling time window
- Apply a scoring formula to compute a normalized health score per account
- Match BigQuery accounts to Salesforce Accounts by domain or external ID
- Write the health score and last-active date back to custom fields on the Salesforce Account record
Connectors Used: Google BigQuery, Salesforce