Google Sheets Salesforce Pipeline Export
Pull your Salesforce pipeline into Google Sheets for reporting, team reviews, and executive visibility without manual copy-paste.
The Challenge
Salesforce reports are powerful but not always shareable. When your board wants a pipeline snapshot, your VP needs a deal review sheet, or you want a quick view of what's closing this quarter, you end up manually exporting CSVs and reformatting them. This prompt queries Salesforce directly and builds a clean, structured pipeline tracker in Google Sheets.
What This Prompt Does
Query Pipeline
Pull open opportunities from Salesforce with SOQL
Enrich Accounts
Look up account names and details for each deal
Deduplicate
Check existing sheet data before adding new rows
Export to Sheets
Append deals sorted by close date with calculated fields
The Prompt
The Prompt
Task
Export your Salesforce pipeline to a Google Sheets spreadsheet for reporting and team visibility. Use @Salesforce/SOQL QueryName it "Salesforce/SOQL Query" and call it with @Salesforce/SOQL Query to pull open opportunities, @Salesforce/Find Account by NameName it "Salesforce/Find Account by Name" and call it with @Salesforce/Find Account by Name to enrich with account details, @Google Sheets/Read RangeName it "Google Sheets/Read Range" and call it with @Google Sheets/Read Range to check existing data, @Google Sheets/Search ValuesName it "Google Sheets/Search Values" and call it with @Google Sheets/Search Values to find and update existing entries, and @Google Sheets/Append RowName it "Google Sheets/Append Row" and call it with @Google Sheets/Append Row to add new rows.
Example: Export all open opportunities closing this quarter to my pipeline tracker spreadsheet.
Input
The user will provide:
- Pipeline filters (stage, close date range, owner, minimum amount)
- Google Sheets spreadsheet ID for the export
- Optional: specific fields to include beyond the defaults
Example: "Export all opportunities in Negotiation or Proposal stage closing in Q1 2025 to spreadsheet ID 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
Context
Query Strategy
- Run a SOQL query to pull opportunities matching the user's filters:
SELECT Id, Name, StageName, Amount, CloseDate, OwnerId, AccountId, Probability, NextStep FROM Opportunity WHERE IsClosed = false - Add filters for stage, close date, and amount as specified
- For each opportunity, look up the Account name using Salesforce/Find Account by Name
- Read existing spreadsheet data to identify which deals are already tracked
- Append new deals and flag deals whose stage or amount has changed
Column Structure
The spreadsheet should have these columns:
- Opportunity Name
- Account Name
- Stage
- Amount
- Close Date
- Probability
- Owner
- Next Step
- Days Until Close
- Last Updated
Data Handling
- Calculate "Days Until Close" from today's date minus the CloseDate
- Flag deals closing within 14 days as urgent
- Sort by close date (soonest first) when appending
- If a deal already exists in the sheet, note it in the summary but don't duplicate
- Format amounts as currency (e.g., $50,000)
Output
Pipeline Snapshot:
- Total open deals: [X]
- Total pipeline value: $[X]
- Weighted pipeline: $[X] (sum of amount * probability)
- Deals closing this month: [X]
Stage Breakdown: | Stage | Deals | Value | Avg Days to Close | |-------|-------|-------|-------------------| | [Stage 1] | X | $X | X |
Deals Added to Sheet: [X] new, [X] already tracked
Urgent Deals (closing within 14 days): | Deal | Account | Amount | Close Date | Next Step | |------|---------|--------|------------|-----------| | [Deal 1] | [Account] | $X | [Date] | [Step] |
Recommendation: [One sentence on pipeline health — e.g., "Pipeline is front-loaded with 60% of value closing in the next 30 days. Consider building more early-stage pipeline."]
Example Usage
Try asking:
- →"Export all deals closing this quarter to my pipeline tracker sheet"
- →"Pull Salesforce opportunities over $50k in Negotiation stage to Google Sheets"
- →"Build a weekly pipeline snapshot in my reporting spreadsheet from Salesforce"