All articles

Data & connectors

Connect HubSpot

Weft connects to HubSpot through its own HubSpot app, so there is nothing to register on your side. An Admin adds the connection once, then authorizes it with their own HubSpot login. The one HubSpot-specific step is choosing your Account region.

Adding the connection (Part 1) needs the Admin or Owner role; authorizing it with your own login (Part 2) is open to editors too. All of this is in the hosted app (signed in to a workspace). In local mode, and for a viewer, Settings → Integrations shows only a note.

Weft never asks for a HubSpot password. Authorization happens on HubSpot's own consent screen; Weft holds only a refresh token.

Part 1 — add the connection (Admin, once)

  1. Open Settings — the gear button in the app bar — and choose Integrations.
  2. Press Register connection. If your workspace offers both Salesforce and HubSpot, choose HubSpot under Provider.
  3. Enter a Connection name — Acme HubSpot, or the portal name.
  4. Choose the Account region — US or EU. See below; this one matters, and it cannot be changed later.
  5. Press Save connection.

Leave Use my own HubSpot app (advanced) off. It is for companies whose policy requires every integration to run under an app they registered themselves — see the last section of this article.

Choosing the right region

HubSpot hosts portals in separate regions, and the consent screen lives on a region-specific address. A US portal approves at app.hubspot.com; an EU portal approves at app-eu1.hubspot.com.

Pick the region your HubSpot portal is in — not where your company is, and not where your Weft workspace is. If you are unsure, look at the address bar when you are signed in to HubSpot.

Getting this wrong does not damage anything, but authorization will fail or land you in the wrong portal. The region is fixed when the connection is created — there is no way to edit it afterwards. To fix it, remove the connection and add it again with the right region, then rebuild on the new connection any data sources that used the old one (a saved data source's connection cannot be changed). Finally, publish each affected template again — see Publish a template. A published render reads the data source frozen into the published version, which still points at the removed connection until you republish.

This setting only steers the consent screen. Data and token traffic route themselves, so nothing else in the connection depends on it.

Part 2 — authorize with your own login

Press Connect on the connection's row in Settings → Integrations.

  • A new tab opens on HubSpot's consent screen. Approve it there, selecting the portal you want if you have more than one.
  • The tab shows Connected — your data source is authorized. and closes itself. Your Weft tab stays where it was, with the connection's row highlighted.

Your authorization is tied to the portal you chose at consent. Pressing Connect again replaces it.

Weft runs every HubSpot query as the person asking, with that person's own authorization. The Connect button on each row works for editors too; only Register connection and Remove are limited to Admins and Owners. Until you have connected, the data-source builder, live data, and previews and exports that use a HubSpot data source fail for you with "the acting user has not authorized this connection".

If HubSpot isn't available in Weft right now, each HubSpot row says HubSpot isn't available right now and has no Connect button. Your connections and their settings are kept, and Connect returns when HubSpot does.

What you can query

Weft always reads contacts, companies, deals and line items (the products and prices on a deal). It also asks for products, quotes, tickets and custom objects, but these are optional: HubSpot leaves one out when your HubSpot plan does not include it (custom objects need HubSpot Enterprise), and you can untick any of them on HubSpot's consent screen. The data-source builder lists only the objects Weft was given, so one left out does not appear there. Custom objects are listed by their own names, such as Projects, and can be the main object of a data source or pulled in as related records.

Associations are supported and are how you pull related records: the contacts on a deal, the companies a contact belongs to. Weft follows them and mounts the related records as a clean list, so a template repeats over them exactly as it would over Salesforce child records. Associations are many-to-many in HubSpot, and Weft handles that — a contact associated with three deals appears under each.

Filtering an association by its label — "only the decision maker contacts" — is not supported. Pull the associated records and filter on a field instead.

Verify it works

With a template open, open the data pill — the button in the bar directly above your document that names the data you are previewing. Choose Build a data source, or Manage sources… and then New data source if the template already has one (see Build a data source). Pick the connection under Connection, then an object and a couple of properties, and press Preview rows. Records coming back means the connection is live for you.

Troubleshooting

Consent screen 404s or shows the wrong portal — the region is wrong. The region cannot be edited: remove the connection and add it again with the right region, as described under choosing the right region above.

A custom object is missing from the object list — custom objects come only with HubSpot Enterprise, and Weft lists them only when HubSpot gave it access to them. If they were unticked on HubSpot's consent screen, press Connect again and leave them ticked.

Products, quotes or tickets are missing from the object list — Weft lists them only when HubSpot gave it access to them. If one was unticked on HubSpot's consent screen, press Connect again and leave it ticked. If it is still missing, your HubSpot plan or your HubSpot user does not include that object, and Weft cannot read it until it does.

An object or property you expected will not load — if you connect through Weft's app, contact Weft support with the round Get help button in the bottom-right corner of Weft. If you use your own app, check that it declares exactly the scopes listed in the last section of this article; an app that declares different ones fails or limits what Weft can read.

"Please allow pop-ups for this site, then click Connect again." — your browser blocked the consent tab. Allow pop-ups for Weft and press Connect again.

"this connection wasn't started from this browser" — the consent was approved in a different browser from the one where Connect was pressed, so Weft discarded it. Press Connect again and approve in the tab it opens.

"this connection was started from the CRM's side" — you installed the Weft app from HubSpot, for example from an install link, instead of pressing Connect in Weft. HubSpot cannot tell Weft which workspace or person the install is for, so Weft does not use it. Weft opens Settings → Integrations for you: press Connect on the HubSpot connection there and approve HubSpot's consent screen again.

Using your own HubSpot app (advanced)

Most teams never need this. If your company requires integrations to run under its own app:

  1. Create an app with OAuth authentication using HubSpot's developer tools. HubSpot creates new apps as projects with its command-line tool, not on its website.
  2. In Weft, start registering the connection as in Part 1 and turn on Use my own HubSpot app (advanced). A Callback URL box appears near the top of the form; add that URL to your app's redirect URLs, exactly as shown.
  3. Declare exactly the scopes Weft requests — no more, no fewer. Required scopes: oauth, crm.objects.contacts.read, crm.objects.companies.read, crm.objects.deals.read, crm.objects.line_items.read, crm.schemas.contacts.read, crm.schemas.companies.read, crm.schemas.deals.read and crm.schemas.line_items.read. Optional scopes: crm.objects.products.read, crm.objects.quotes.read, crm.schemas.quotes.read, crm.objects.tickets.read, crm.objects.custom.read and crm.schemas.custom.read. HubSpot refuses the connection when the app's scopes and Weft's request differ.
  4. Back in Weft, paste the app's Client ID and Client Secret, choose the Account region as above, and press Save connection. The credentials are stored encrypted, and this connection then runs under your app instead of Weft's.

Removing a connection

An Admin or Owner presses Remove on the connection's row, then Remove again in the Remove this connection? dialog. This deletes the connection's stored credentials and every person's authorization on it. Data sources pointing at it stop loading data, so check what uses it first.

What next