Skip to content

Connect HubSpot to a tool built with Claude or ChatGPT (2026)

Your tool built with Claude needs to read HubSpot contacts or deals. The classic risk is pasting the HubSpot credential into the code or the conversation. On while, it stays in while, and your AI never sees it. Here is how, with the service keys that replace private apps.

By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 18, 2026.

View as Markdown

Connect HubSpot to a tool built with Claude or ChatGPT: the HubSpot service key kept in while, out of the code and out of the AI’s reach, and the tool reading CRM contacts and deals

A tool built with Claude or ChatGPT becomes truly useful when it reads your data: HubSpot contacts, open deals, the companies the team follows. For that, it needs a HubSpot credential. And that is where things often go wrong: the credential ends up pasted into the code, or into the conversation with the AI, where it can leak.

On while, the HubSpot credential stays in while. The tool calls HubSpot without ever holding it, and your AI never sees it. Here is the path, with service keys, which since this fall replace HubSpot’s private apps.

The short version. Create a service key in HubSpot with the scopes the tool needs, ask your AI to connect HubSpot, then paste the service key into while through the link it gives you. The tool reads HubSpot, every call is logged, and a write waits for the rule you approve.

Service keys replace private apps

Since October 26, 2026, private apps can no longer be created in an existing HubSpot account. Those that exist keep working2. For a tool that reads and writes data, the path is now the service key: an account credential, with chosen scopes, sent with each request1.

Connect HubSpot to your tool, in three steps

The whole thing takes a few minutes, and you do not have to write a line of code.

  1. Create a service key in HubSpot. Open Development, then Keys and Service keys, and click Create service key. Add only the scopes the tool needs, for example reading contacts. You must be a super admin, or have the Developer tools access permission1.
  2. Ask your AI to connect HubSpot. It declares the connection in while and gives you a link.
  3. Paste the service key into while. You open the link, paste the service key and confirm. Neither your AI nor the tool’s code sees it.

You, to your AI: Connect HubSpot to this tool so it shows each salesperson’s open deals.

The tool built with AI calls HubSpot through while: the service key is added to each call in while, out of the code, every call is logged and a write to the CRM waits for the rule approved by a person
The tool calls HubSpot through while, which adds the credential to each call.

What while does on each call

The tool calls HubSpot through while, without a credential. while adds the service key to each call, and logs it. For the first seven days, reads go through and help learn what the tool calls. A write, like creating or updating a contact, goes through as soon as you approve its rule. After that, an unexpected call is refused, and your AI is notified.

You can also ask for your approval before a sensitive call.

You, to your AI: Ask me before each contact deletion in HubSpot.

Each deletion then waits for your approval in while before going to HubSpot. Your software credentials are covered on our security page, and the same mechanism works for any API in connect an API without a credential in the code.

Changing the service key

HubSpot lets you rotate a service key, manually or every 3, 6 or 12 months, and recommends doing it every six months1. When it changes, paste the new one into while: the tool uses it from the next call, with nothing to redo.

One limit to know: a service key does not work for HubSpot webhooks1. For a tool that reads and writes data, it is enough.

What while brings around it

  • Your colleagues use the tool with a while account for up to 3 people, or, on the Pro plan, with their email account, Google or Microsoft. See keep a tool for your colleagues.
  • Connected software: one on the Free plan, and 25 on the Pro plan.
  • The tool’s data is backed up every day, and your tools are hosted in France by Nextmap.

For a CRM built entirely by your AI, see build a simple CRM with Claude or ChatGPT.

Try it with your tool

Give this message to your AI, then ask it to connect HubSpot. The trial is free, with no sign-up, and your tool has its address in 3 minutes.

The message to give your AI
Read while.sh/agents and help me get started with while.

Sources

  1. HubSpot, Make API requests using a service key, accessed November 18, 2026
  2. HubSpot, Legacy private apps, accessed November 18, 2026

Questions

How do you get access to the HubSpot API in 2026?

With a service key. In HubSpot, open Development, then Keys and Service keys, and create one with the scopes the tool needs. Since October 26, 2026, private apps can no longer be created1,2.

Who can create a service key?

Super admins of the HubSpot account, and people with the Developer tools access permission1.

Does my AI see the HubSpot credential?

No. Your AI declares the HubSpot connection and gives you a link. You paste the service key there, in while, and neither your AI nor the tool’s code sees it.

Can you receive HubSpot webhooks with a service key?

No. A service key is for requests to the HubSpot API, not for webhooks or UI extensions1.

What if the service key changes?

Paste the new one into while: the tool uses it from the next call, with nothing to redo. HubSpot can also rotate the service key every 3, 6 or 12 months1.

Give your AI the message, and it takes care of the rest

Give this to your AI

Read while.sh/agents and help me get started with while.

Copy the message

In 3 minutes, with no sign-up, the tool has its own address. To keep it, create your account.

For a company project, write to the while team: hello@while.sh