Skip to content

Every hour

Enrich companies from a sheet and update HubSpot

Companies you add to your Enrich sheet are researched, created or updated in HubSpot with industry, size and a summary, and the row is marked done.

Runs
Every hour
Apps
Google Sheets, HubSpot
AI
Yes, uses the built-in AI allowance
Access
Sheets edit; HubSpot crm.objects.companies/contacts.read+write

Send this to your assistant

Create a ClickRuntime automation: every hour, take new companies from my 'Enrich' sheet, research each one from its website, create or update it in HubSpot with industry, size and a short summary, and mark the row done.

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

A sales team builds target lists in a Google Sheet: a company name and website, collected from events, directories or a colleague's list. Before anyone can prioritise, each company needs an industry, a rough size and a line on what they do, and filling that in by hand for 200 rows is a week of tab-switching.

This takes each new row, reads the company's website, has AI write the industry, size band and a short summary, and puts the company into HubSpot with those details. The row is marked done with a link back, so the sheet shows exactly what has been processed.

What you get out of it

  • Target lists become usable CRM records

    Each company arrives in HubSpot with the fields your team filters on, not just a name.

  • No duplicates in HubSpot

    Companies are matched by website domain, so existing records are updated instead of copied.

  • The sheet shows progress

    Each processed row is marked done with the HubSpot ID, so you can see what's left at a glance.

  • Research happens while you work on something else

    New rows are picked up every hour, so adding twenty companies before lunch means they're ready by the afternoon.

How it works

What happens, step by step

  1. Every hour, ClickRuntime reads your Enrich sheet and picks out rows without a status.

  2. For each company it reads the website and AI writes the industry, size band and a short summary.

  3. It looks for the company in HubSpot by website domain, then updates it or creates a new one.

  4. The row is marked done with the HubSpot ID, so it isn't processed again.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect HubSpot

What you get

RunsEvery hour
Enrich companies from a sheet and update HubSpottoday, 9:00Succeeded
Google Sheets · EnrichContoso Pharma, contoso-pharma.example: done 18452231 Pharmaceutical manufacturing, 200-500 staff. Makes generic medicines for hospital pharmacies across Europe.

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

  • Act only on the items that match your own rules, and skip the rest
  • 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 HubSpot 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.
enrich_hubspot_contacts_and_companies_logged_in_a_sheet.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from bs4 import BeautifulSoup
from clickruntime import on_trigger, credentials, http, ai, report_fetched
SHEET_ID = "1AbCdEfGhIjKlMnOpQrStUvWxYz"
SCHEMA = {"type": "object", "properties": {"industry": {"type": "string"}, "size": {"type": "string"}, "summary": {"type": "string"}}, "required": ["industry", "size", "summary"]}
def hs(method, path, **kw):
    r = http.request(method, f"https://api.hubapi.com{path}", headers={"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"}, **kw)
    return r.raise_for_status() or (r.json() if r.content else {})
def sheets():
    return build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()

@on_trigger
def run(event):
    rows = sheets().get(spreadsheetId=SHEET_ID, range="Enrich!A2:C").execute().get("values", [])
    todo = [(i + 2, r) for i, r in enumerate(rows) if len(r) >= 2 and len(r) < 3]
    report_fetched(len(todo))
    if not todo:
        return {"enriched": 0}
    for row, (name, site) in todo[:20]:
        domain = site.replace("https://", "").replace("http://", "").strip("/")
        text = BeautifulSoup(http.get(f"https://{domain}").text, "html.parser").get_text(" ", strip=True)[:3000]
        info = ai.generate(f"Company {name}. Website text:\n{text}\nGive industry, size band and a 2-sentence summary.", json_schema=SCHEMA, max_output_tokens=200).json
        props = {"name": name, "domain": domain, "industry_note": info["industry"], "size_band": info["size"], "description": info["summary"]}
        hit = hs("POST", "/crm/v3/objects/companies/search", json={"filterGroups": [{"filters": [{"propertyName": "domain", "operator": "EQ", "value": domain}]}]})["results"]
        cid = hs("PATCH", f"/crm/v3/objects/companies/{hit[0]['id']}", json={"properties": props})["id"] if hit else hs("POST", "/crm/v3/objects/companies", json={"properties": props})["id"]
        sheets().update(spreadsheetId=SHEET_ID, range=f"Enrich!C{row}", valueInputOption="RAW", body={"values": [[f"done {cid}"]]}).execute()
    return {"enriched": min(len(todo), 20)}

FAQ

Common questions

Where does the information come from?
From the company's own website homepage. AI reads the page text and writes the industry, an estimated size band and a two-sentence summary.
What do I need in the sheet?
At minimum a company name and website column, plus a status column it can write to. Anything else in the sheet is left alone.
What if the website can't be read?
The row is marked with an error note instead of done, so you can check the address and it will be retried after you clear the note.
What permissions does it need?
Sheets edit; HubSpot crm.objects.companies/contacts.read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new 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 “Enrich companies from a sheet and update HubSpot” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.