---
title: "Connect Notion to an AI-built tool, with no token in the code"
url: https://while.sh/en/guides/connect-notion-ai-tool/
author: "Aloïs Oddon, co-founder of Nextmap"
updated: 2026-11-18
---

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

Your procedures, client records or task lists live in Notion, and your tool built with Claude needs to read them. The risk is pasting the Notion credential into the code or the conversation. On while, it stays in while, and your AI never sees it. Here is how.

In many small businesses, Notion is the team's memory: procedures, client records, task lists. A tool built with Claude or ChatGPT becomes much more useful when it can read them, to show a client's record or the day's procedure. For that, it needs a Notion credential, and **that credential should be pasted neither into the code nor into the conversation**.

On while, the Notion credential **stays in while**. The tool calls Notion without ever holding it, and your AI never sees it.

> **The short version.** Create an internal connection in Notion, share with it the pages the tool needs to read, ask your AI to connect Notion, then paste the token into while through the link it gives you. The tool reads Notion, and every call is logged.

## Connect Notion to your tool, in four steps

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

1. **Create an internal connection in Notion.** From Notion's developer portal, create a connection, then open its Configuration tab to get its token. You must be a workspace owner (source 1).
2. **Share the pages with the connection.** A connection sees nothing until something is shared with it. Open each useful page, then the menu at the top right, and add the connection under Add connections (source 1).
3. **Ask your AI to connect Notion.** It declares the connection in while and gives you a link.
4. **Paste the token into while.** You open the link, paste the token and confirm. Neither your AI nor the tool's code sees it.

> You, to your AI: Connect Notion to this tool so it shows each client's record from our Clients page.

<figure class="illus"><img src="/illustrations/notion-partage-1200.webp" srcset="/illustrations/notion-partage-768.webp 768w, /illustrations/notion-partage-1200.webp 1200w" sizes="(min-width: 48rem) 46rem, 100vw" width="1536" height="1024" loading="lazy" decoding="async" alt="Share a Notion page with an internal connection so a tool built with AI reads it through while: only the shared page goes to the tool, the other Notion pages stay closed" /><figcaption>Only the pages shared with the connection reach the tool.</figcaption></figure>

## What while does on each call

The tool calls Notion **through while**, without a credential. while adds the token 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 a page or updating a database, goes through as soon as you approve its rule. After that, an unexpected call is refused, and your AI is notified.

Notion's page-by-page sharing and while's rules add up: the tool only reads what you shared with it, and only writes what you allowed. The same mechanism works for any API in [connect an API without a credential in the code](/en/guides/api-keys-out-of-code/), and the details are on our [security](/en/security/) page.

## 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](/en/guides/internal-tool-company-sign-in/).
- **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.

To also connect your CRM, see [connect HubSpot to a tool built with AI](/en/guides/connect-hubspot-ai-tool/).

## Try it with your tool

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

```text titre="The message to give your AI"
Read while.sh/agents and help me get started with while.
```

## Sources

1. [Notion, Authorization](https://developers.notion.com/docs/authorization), 2026-11-18

## Questions

### How do you get access to the Notion API?

With an internal connection. Create it from Notion's developer portal, then get its token from the Configuration tab. You must be a workspace owner (source 1).

### Why does the tool see no pages?

Because a connection sees nothing until a page is shared with it. Open the page, then the menu at the top right, and add the connection under Add connections (source 1).

### Does my AI see the Notion credential?

No. Your AI declares the Notion connection and gives you a link. You paste the token there, in while, and neither your AI nor the tool's code sees it.

### Can the tool write to Notion?

Yes, if the connection is allowed to. On while, a write goes through as soon as you approve its rule, and every call is logged.

### How many software products can you connect?

One on while's Free plan, and 25 on the Pro plan.
