Monthly
Build a white-space table of what key accounts haven't bought
Each month, a Google Sheet shows every key account against your product list, marking what they own and counting the gaps.
- Runs
- Monthly
- Apps
- Google Sheets, Salesforce
- AI
- Optional
- Access
- api; sheet edit
Send this to your assistant
Create a ClickRuntime automation: every month, list my Tier 1 Salesforce accounts and the products they've bought, and write a table to my White space tab showing which products each account doesn't have yet.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Account managers know their customers' current projects, but rarely have a clear view of what each account has never bought. Building that view means exporting won opportunities and products, pivoting them, and redoing it every month when new deals close.
This automation builds the table for you each month: one row per key account, one column per product, with a mark for what they own and a count of gaps. Account planning starts from a current picture instead of a stale export.
What you get out of it
Upsell targets at a glance
Accounts with many gaps stand out, which makes it easy to choose where to focus next quarter.
Always current
The table is rebuilt from won deals each month, so new purchases show up without anyone updating the sheet.
Built for planning meetings
A plain sheet is easy to sort, filter and discuss in an account review.
No AI cost
The table comes straight from your Salesforce data; AI suggestions are optional.
How it works
What happens, step by step
Once a month the automation reads the products on won deals for your key accounts in Salesforce.
It works out which of your products each account already owns.
A table is built with one row per account and a column per product.
The White space tab of your sheet is cleared and refilled with the new table.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Salesforce
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Google Sheets and Salesforce steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from collections import defaultdict
from clickruntime import on_trigger, credentials, http
SHEET_ID = "your-spreadsheet-id"
PRODUCTS = ["Core Platform", "Analytics", "Integrations", "Premium Support", "Training"]
INSTANCE = "https://yourcompany.my.salesforce.com"
API = f"{INSTANCE}/services/data/v61.0"
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
q = ("SELECT Opportunity.Account.Name, Opportunity.Account.Owner.Name, Product2.Name FROM OpportunityLineItem "
"WHERE Opportunity.IsWon = true AND Opportunity.Account.Tier__c = 'Tier 1'")
resp = http.get(f"{API}/query", headers=headers, params={"q": q}).json()
owned, owners = defaultdict(set), {}
for item in resp["records"]:
account = item["Opportunity"]["Account"]
owned[account["Name"]].add(item["Product2"]["Name"])
owners[account["Name"]] = account["Owner"]["Name"]
table = [["Account", "Owner"] + PRODUCTS + ["Gaps"]]
for name in sorted(owned):
marks = ["Yes" if p in owned[name] else "" for p in PRODUCTS]
table.append([name, owners[name]] + marks + [marks.count("")])
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")),
cache_discovery=False).spreadsheets()
sheets.values().clear(spreadsheetId=SHEET_ID, range="White space!A:Z").execute()
sheets.values().update(spreadsheetId=SHEET_ID, range="White space!A1", valueInputOption="RAW",
body={"values": table}).execute()
return {"accounts": len(table) - 1}FAQ
Common questions
Where does the product list come from?
Which accounts are included?
Can it suggest which product to pitch?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Audit open deals against rules kept in a sheet
Every Monday, open Salesforce deals are checked against the rules in your Google Sheet and every breach is listed on a Findings tab.
See how it worksLog review sentiment in a sheet and open cases for bad ones
New customer reviews are labelled positive, neutral or negative in a Google Sheet, and negative ones become Salesforce cases.
See how it worksGet realistic close dates for open deals
Every week, AI estimates a realistic close date for each open deal, saves it in Salesforce and logs the old and new dates in a sheet.
See how it worksKeep exploring
Set up “Build a white-space table of what key accounts haven't bought” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.