HubSpot tools reference
The ten tools of AdCopilot for HubSpot: the question each answers, its arguments and what it returns.
AdCopilot for HubSpot has ten tools, all read-only. Start with
hubspot_get_context; it never asks HubSpot and is not counted in your
daily use. Each of the other nine asks HubSpot and counts as one
operation. One of them, hubspot_leads_counts, reads only where HubSpot
gave that access when you connected (below).
Common arguments. account_id is your HubSpot account's id (its
portal id); leave it out to read the account you connected. start_date
and end_date are dates as YYYY-MM-DD in your HubSpot account's time zone;
left out, the period is the last 30 days, and it can be at most 366 days.
Amounts come one total per currency, never converted. When truncated is
true, HubSpot holds more records for the question than one call reads
(5,000 in all), so the totals are partial: ask for a shorter period.
hubspot_get_context
"Is HubSpot connected, and what can you read for me?"
- Arguments:
source(optional): a label for the app or plugin that asks. - Returns: whether you are
connected, thenext_step(such asconnect_hubspot,reconnect,upgrade_plan,switch_on_accountsorready) with theconnect_urlorreconnect_reasonit needs, theplan_line, and your account inaccounts, with its currency, time zone andhosting(where HubSpot hosts it) as stored when you connected. It reads AdCopilot's own records only.
hubspot_revenue_summary
"How much closed-won revenue did we book last quarter, and what is open in the pipeline?"
- Arguments:
account_id(optional),start_date,end_date. - Returns:
closed_won: deals whose close date falls in the period, their count, amount andaverageper currency, alsoby_pipeline; andopen: every deal open now, with its amount and theweighted_amount(each deal's amount times its stage's win probability).
hubspot_revenue_by_source
"How much pipeline and revenue does HubSpot record from paid search, against organic and referrals?"
- Arguments:
account_id(optional),start_date,end_date,source_kind:original(HubSpot's Original Traffic Source, the default) orlatest. - Returns:
closed_wonrevenue in the period and theopenpipeline of deals created in it, by HubSpot's traffic source category (such aspaid_search,organic_search,referrals,direct_traffic,paid_socialoroffline_sources), with deal counts and amounts per currency, andno_sourcefor deals with none recorded. Categories only: never a page, a referring site or a search term.
hubspot_paid_search_pipeline
"Which Google campaign names does HubSpot record on my deals, and how far did those deals get?"
- Arguments:
account_id(optional),start_date,end_date,source_kind(originalorlatest),include_search_terms(default false). - Returns: for the deals created in the period that HubSpot records as
Paid search, up to 50
campaigns, each with its name inuntrusted_campaign(the visit's utm_campaign; with HubSpot's Google Ads tracking on, the Google Ads campaign's name) and how many deals areopen,wonandlost, with their amounts per currency.more_campaignscounts the rest,no_campaignthe deals with no campaign name, andwithheldthe names and terms held back (one that holds an email address, a phone number or a web address is never shown). Withinclude_search_terms, each campaign also lists up to 20 of HubSpot's recorded search terms inuntrusted_search_terms, counts only.
hubspot_lead_counts
"How many new leads did we get this month, and how many from paid search?"
- Arguments:
account_id(optional),start_date,end_date. - Returns: the contacts created in the period (
new_contacts), by the lifecycle stage each holds now (by_stage), forall_sourcesand forpaid_searchalone. Counts only: no contact is read.
hubspot_lifecycle_funnel
"Of last month's paid-search leads, how many became qualified, and how many customers?"
- Arguments:
account_id(optional),start_date,end_date. - Returns: of the contacts created in the period, how many have
reachedeach stage (lead, marketing qualified, sales qualified, opportunity, customer), each also as ashareof the new contacts, forall_sourcesand forpaid_searchalone. A contact counts at a stage when HubSpot recorded the date it entered it, so one that skipped a stage is not counted there.
hubspot_form_conversions
"Which forms turn paid visitors into contacts?"
- Arguments:
account_id(optional),start_date,end_date. - Returns: the contacts whose first form submission falls in the
period, by the name HubSpot recorded for that first form (in
untrusted_form, up to 50forms) andby_source(each contact's original traffic source).more_formscounts the rest,no_formthe contacts with no form name, andwithheldthe names held back. No form submission is read.
hubspot_tracking_health
"Is HubSpot capturing my Google Ads traffic: do paid-search contacts carry the Google click id, and do deals carry a source?"
- Arguments:
account_id(optional),start_date,end_date. - Returns: of the contacts created in the period whose original
traffic source is Paid search (
paid_search_contacts), how many arewith_click_idandwithout_click_id, and theirshare_with_click_id; of thedealscreated in it, how many arewith_sourceandwithout_source, and theirshare_with_source. A click id's value is never read or returned.
hubspot_revenue_daily
"Give me closed-won revenue per day to set against my daily spend."
- Arguments:
account_id(optional),start_date,end_date,currency(a three-letter code such as EUR; by default your HubSpot account's own currency). - Returns: one row for every day of the period in
days(days with none show 0): the closed-won deals and amount by close date, in onecurrency, never converted, and theseries_total. Deals in other currencies are totalled apart inother_currencies.
hubspot_leads_counts
"How many leads did we create this month, and where are they now?"
- Arguments:
account_id(optional),start_date,end_date. - Returns: the leads (HubSpot's Leads object, on Sales Hub Professional
or Enterprise) created in the period, as
new_leads, andby_stage: how many are in each pipeline and stage now, by HubSpot's own ids for them, most first. A lead is not a contact:hubspot_lead_countscounts new contacts. Counts only: no lead's name or contact is read. - Needs: a connection made after AdCopilot asked HubSpot for leads, on a plan that has them. Otherwise it says so and reads nothing: connect HubSpot again on the AdCopilot dashboard and approve it.
HubSpot is a trademark of HubSpot, Inc. AdCopilot is not affiliated with or endorsed by HubSpot.