Every 15 minutes
Sync leads from a Google Sheet into HubSpot
New rows in your Leads sheet become HubSpot contacts within 15 minutes, without duplicates, and each row gets its HubSpot ID.
- Runs
- Every 15 minutes
- Apps
- Google Sheets, HubSpot
- AI
- Not needed
- Access
- Sheets edit; HubSpot contacts write
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, create or update HubSpot contacts from new rows in my 'Leads' sheet, matching on email, and write the HubSpot ID back to the row.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Leads often start life in a spreadsheet: an event team typing badge scans, a partner sharing a list, or an assistant collecting enquiries from phone calls. Someone then has to import the sheet into HubSpot, and doing it every few days means duplicates, missed rows and a CRM that's always a bit behind.
This keeps the sheet and HubSpot in step. Anyone can keep adding rows as they normally would, and every new row turns into a HubSpot contact with the ID written back, so it's obvious which rows are synced.
What you get out of it
People keep working in the sheet
Event staff or partners don't need HubSpot access; they just fill in rows.
No duplicate contacts
Each row is matched by email, so existing contacts are updated rather than created twice.
You can see what's synced
The HubSpot ID in each row shows at a glance which leads made it into the CRM.
Fast enough to act on
New rows appear in HubSpot within 15 minutes, so follow-up can start the same day.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime reads your Leads sheet and picks out rows without a HubSpot ID.
It sends those rows to HubSpot in one batch, matching existing contacts by email.
New people become contacts and existing ones are updated with the row's details.
Each contact's HubSpot ID is written back to its row, so it isn't sent again.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect HubSpot
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
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- 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
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, report_fetched
SHEET_ID = "1AbCdEfGhIjKlMnOpQrStUvWxYz"
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="Leads!A2:E").execute().get("values", [])
todo = [(i + 2, r + [""] * (5 - len(r))) for i, r in enumerate(rows) if r and "@" in r[0] and (len(r) < 5 or not r[4])][:100]
report_fetched(len(todo))
if not todo:
return {"synced": 0}
inputs = [{"idProperty": "email", "id": r[0].strip().lower(), "properties": {"email": r[0].strip().lower(), "firstname": r[1], "lastname": r[2], "company": r[3]}} for _, r in todo]
resp = http.post("https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert", json={"inputs": inputs},
headers={"Authorization": f"Bearer {credentials.connection('hubspot', 'work')}"})
resp.raise_for_status()
ids = {c["properties"]["email"]: c["id"] for c in resp.json()["results"]}
data = [{"range": f"Leads!E{row}", "values": [[ids.get(r[0].strip().lower(), "")]]} for row, r in todo]
sheets().batchUpdate(spreadsheetId=SHEET_ID, body={"valueInputOption": "RAW", "data": data}).execute()
return {"synced": len(ids)}FAQ
Common questions
What columns does my sheet need?
What if a row has no email?
Does editing a row later update HubSpot?
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
Log new HubSpot form submissions to Google Sheets
Each new submission to a HubSpot form becomes a row in a Google Sheets tab, one column per form field, with the page it came from.
See how it worksEnrich 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.
See how it worksTrack weekly HubSpot lifecycle numbers in a sheet
Every Monday a new row in your Pipeline metrics sheet shows how many contacts reached each lifecycle stage last week, split by source.
See how it worksKeep exploring
Set up “Sync leads from a Google Sheet into HubSpot” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.