AdCopilot docsby Atromx
Tool reference

HubSpot tools reference

The ten tools of AdCopilot for HubSpot: the question each answers, its arguments and what it returns.

View as Markdown
Open inClaudePerplexity

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, the next_step (such as connect_hubspot, reconnect, upgrade_plan, switch_on_accounts or ready) with the connect_url or reconnect_reason it needs, the plan_line, and your account in accounts, with its currency, time zone and hosting (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 and average per currency, also by_pipeline; and open: every deal open now, with its amount and the weighted_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) or latest.
  • Returns: closed_won revenue in the period and the open pipeline of deals created in it, by HubSpot's traffic source category (such as paid_search, organic_search, referrals, direct_traffic, paid_social or offline_sources), with deal counts and amounts per currency, and no_source for 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 (original or latest), 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 in untrusted_campaign (the visit's utm_campaign; with HubSpot's Google Ads tracking on, the Google Ads campaign's name) and how many deals are open, won and lost, with their amounts per currency. more_campaigns counts the rest, no_campaign the deals with no campaign name, and withheld the names and terms held back (one that holds an email address, a phone number or a web address is never shown). With include_search_terms, each campaign also lists up to 20 of HubSpot's recorded search terms in untrusted_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), for all_sources and for paid_search alone. 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 reached each stage (lead, marketing qualified, sales qualified, opportunity, customer), each also as a share of the new contacts, for all_sources and for paid_search alone. 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 50 forms) and by_source (each contact's original traffic source). more_forms counts the rest, no_form the contacts with no form name, and withheld the 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 are with_click_id and without_click_id, and their share_with_click_id; of the deals created in it, how many are with_source and without_source, and their share_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 one currency, never converted, and the series_total. Deals in other currencies are totalled apart in other_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, and by_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_counts counts 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.

On this page