Import

Import from HubSpot

import_from_hubspot · Changes data · Runs in the background · Markdown

Imports a HubSpot account in the background: companies, contacts, deals and notes, linked as they were.

$0.001 per record imported (created or updated)

From your agent’s balance. A call that fails costs nothing.

An example

We're leaving HubSpot. Bring over our contacts, companies, deals and notes. Here's the private app token.

Your agent callsimport_from_hubspot$0.001 per record imported (created or updated)

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "access_token": "pat-eu1-00000000-0000-0000-0000-000000000000",
  "default_currency": "EUR"
}
What comes back
{
  "source": "hubspot",
  "done": true,
  "records_imported": 9,
  "imported": {
    "companies": {
      "created": 2,
      "updated": 0,
      "unchanged": 0,
      "skipped": 0
    },
    "contacts": {
      "created": 3,
      "updated": 0,
      "unchanged": 0,
      "skipped": 0
    },
    "deals": {
      "created": 2,
      "updated": 0,
      "unchanged": 0,
      "skipped": 0
    },
    "notes": {
      "created": 2,
      "updated": 0,
      "unchanged": 0,
      "skipped": 0
    }
  }
}

Use it when

The business moves its CRM from HubSpot.

What it does

Import a HubSpot account: companies, contacts (linked to their company), deals (stage, amount, currency, close date, and the company and contact they belong to) and notes (on their contact's timeline, else added to their deal or company). Needs a private app access token. Make one in HubSpot under Development > Legacy apps > Create a private app, with the read scopes crm.objects.companies.read, crm.objects.contacts.read and crm.objects.deals.read; the token is on its Auth tab. Wrong credentials are refused before anything is reserved or charged; the token is kept only encrypted while the import runs, then erased. Contacts match existing ones by email, companies by domain, then name. Runs in the background for up to 15 minutes and imports up to max_records records; when more remain, the result has next_cursor: call again with the same arguments plus next_cursor to continue. Running it again never duplicates anything: changed records are updated, unchanged ones skipped. Unchanged records are free, and 1,000 imported records cost $1. max_records x $0.001 is reserved while it runs and only what was imported is charged; lower max_records if your balance is smaller.

What comes back

When it finishes: source, done, records_imported, imported (per kind: created, updated, unchanged, skipped), and when more remain next_cursor, stopped_because and how to continue. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
access_tokenRequiredstringThe HubSpot private app access token (starts with pat-). 10 to 500 characters.
max_recordsintegerThe most records this run may create or update (and reserve $0.001 each for). 1 to 100,000. Default: 10000.
next_cursorstringThe next_cursor a previous run of this import returned, to continue where it stopped. Up to 2,000 characters.
default_currencystringThe currency of deal amounts that name none (HubSpot leaves it blank when the account has a single currency). Matches ^[A-Za-z]{3}$. Default: USD.

The call

Over MCP, call import_from_hubspot on https://api.conecto.chat/mcp/imports. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/import_from_hubspot \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"access_token":"pat-eu1-00000000-0000-0000-0000-000000000000","default_currency":"EUR"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
credentials_refused422HubSpot refused the token: it is wrong, revoked, or may not read contacts.Make a private app with the read scopes the description names, and send its token.
vendor_unavailable502The other service did not answer.Try again in a few minutes, with the same next_cursor if you passed one; nothing was charged.
in_progress409An import from the same tool is running already.Wait for it (account_get_call), then continue with the next_cursor it returns.
invalid_cursor400next_cursor is not one this import returned.Pass back exactly the next_cursor of the last run, or leave it out to start again (nothing is duplicated).

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md