Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Once a month the automation reads the products on won deals for your key accounts in Salesforce.

  2. It works out which of your products each account already owns.

  3. A table is built with one row per account and a column per product.

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

RunsMonthly
Build a white-space table of what key accounts haven't boughttoday, 9:00Succeeded
Google Sheets · White spaceContoso Retail | Dana Ruiz | Core Platform: Yes | Analytics: Yes | Integrations: - | Premium Support: - | Training: - | Gaps: 3

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
account_white_space_report_in_a_sheet.pyexample
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?
From the list of product names at the top of the automation, which should match your Salesforce product names. Ask your AI assistant to read them from Salesforce instead if your catalogue changes often.
Which accounts are included?
Accounts with a tier field set to Tier 1 that have at least one won deal with products. You can use any filter, such as annual revenue or account owner.
Can it suggest which product to pitch?
Yes. Ask for AI suggestions and it will add a column with the most likely next product for each account, based on industry and what they already own.
What permissions does it need?
api; sheet edit. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (monthly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.