Notion AI agent integration
Anlyon's Notion integration gives an AI agent named Notion actions to call through Anlyon's API: it can search, read and write the pages and databases you share with it. Each of your users signs in to Notion on Notion's own consent page, and your company's account connects the same way. The sign-in runs through your own OAuth app. Your agent calls each action by name and never holds the token.
Let an agent search, read and write your workspace, and only the pages you share with it. You create an integration in your own Notion, share the pages, and Anlyon holds its token. Archiving a page can wait for a person.
This page covers Anlyon's own Notion integration, while Notion's official MCP server and how to add it to a client are on the Notion MCP server page.
- host
- api.notion.com
- connect
- Sign in, per user
Create page
notion-create-page
Create database
notion-create-database
Create database page
notion-create-database-page
Update page properties
notion-update-page-properties
What can an AI agent do in Notion? Writes are off until you switch them on.
Each one is a named operation from the pack. Reads change nothing.
Writes
Create page
read backnotion-create-page
Create one page under a page that is shared with the integration.
Create database
read backnotion-create-database
Create one database (a table) under a page shared with the integration, with the columns given in properties.
Create database page
read backnotion-create-database-page
Add one row (page) to a database, with its property values. database_id must be the hyphenated lowercase id the API returns (search-databases, get-database).
Update page properties
read backnotion-update-page-properties
Set property values on one page: the title of any page, or any column of a database row. Properties left out keep their values.
Archive page
read backnotion-archive-page
Move one page to the trash.
Restore page
read backnotion-restore-page
Take one page out of the trash.
Append paragraph
read backnotion-append-paragraph
Add one paragraph to the end of a page.
Append blocks
read backnotion-append-blocks
Add blocks to the end of a page or under a block (or after one of its children with after): paragraphs, headings, bulleted and numbered items, to-dos, toggles, quotes, callouts, code and dividers, text only, no nesting in one call. At most 100 blocks; each counts as one mutation.
Update block text
read backnotion-update-block-text
Replace the text of one block, or tick or untick a to-do. Give exactly one content object, named by the block's current type (get-block shows it); its rich_text replaces the whole text, and checked alone ticks a to-do.
Delete block
read backnotion-delete-block
Move one block (a paragraph, heading, to-do or other content block) to the trash.
Add comment
read backnotion-add-comment
Start a new comment discussion on a page.
Reply to comment
read backnotion-reply-to-comment
Reply in an existing comment discussion (on a page or on selected text), using a discussion_id from list-comments.
Update comment
read backnotion-update-comment
Replace the text of one comment the integration itself posted (Notion answers 404 for anyone else's).
Delete comment
acknowledgednotion-delete-comment
Delete one comment the integration itself posted (Notion answers 404 for anyone else's). Needs the integration's insert comments capability.
Reads
Search pages
notion-search-pages
Search the pages shared with the integration by title, most recently edited first. Changes nothing. Returns up to 10 pages per call; pass the response's next_cursor as start_cursor for the next page. Leave query out or empty to list every shared page.
Search databases
notion-search-databases
Search the databases shared with the integration by title, most recently edited first. Changes nothing. Returns up to 10 databases per call; pass the response's next_cursor as start_cursor for the next page. Leave query out or empty to list every shared database.
Get page
notion-get-page
Read one page's properties (title, and for a database row every column), parent, url and trash state. Does not return the page's content: use list-block-children with the page id for that. Relation and people values over 25 entries are cut; read them with get-page-property.
Get page property
notion-get-page-property
Read one property of a page in full, for values get-page cuts short (long titles and text, relations, people, rollups). property_id is the property's id from get-page with any %XX escapes decoded (for example ':UPp' for '%3AUPp'), or 'title' for the title. Paginated properties return up to 25 items per call; pass next_cursor as start_cursor for the next page.
Get block
notion-get-block
Read one block: its type, its text or other content, whether it has children, and its trash state.
List block children
notion-list-block-children
Read a page's content, or the blocks nested under a block, in order. Returns up to 10 blocks per call; pass next_cursor as start_cursor for the next page. Only the first level: a block with has_children true holds more blocks, read with its own id.
Get database
notion-get-database
Read one database's title, parent and column schema (each property's name, id, type and options). Fails on a database with more than one data source under the pinned API version.
Query database
notion-query-database
List the rows (pages) of a database, optionally filtered and sorted. Changes nothing. Returns up to 10 rows per call, each with all its properties; pass next_cursor as start_cursor for the next page. Fails on a database with more than one data source under the pinned API version.
List comments
notion-list-comments
List the open (unresolved) comments on a page or block, oldest first, with each comment's discussion_id for replying. Returns up to 25 comments per call; pass next_cursor as start_cursor for the next page. Needs the integration's read comments capability.
How do users connect? Each one brings their own Notion.
- 1.Call for the userYour server invokes the action for the signed-in user. Without a Notion connection, the SDK throws EndUserNotConnectedError with a connect link.
- 2.The user pastes a keyThe link opens a form that shows where in Notion's settings to create the key. The link lasts 10 minutes and works once.
- 3.Anlyon checks itThe key is checked with Notion before it is kept, and bound to api.notion.com. It is never shown back.
- 4.Your server confirmsYour server confirms the connection for the user who is signed in, and the call goes through.
How do I control what an AI agent does in Notion? Suggested limits and approvals, for you to review.
Suggested limits
- 100 pages created a day
- 10 databases created a day
- 200 database rows created a day
- 300 page property updates a day
- 20 pages archived a day
- 20 pages restored a day
- 500 paragraphs added a day
- 1,000 blocks added a day
- 300 block edits a day
- 50 blocks deleted a day
- 100 comments a day
- 100 comment replies a day
- 100 comment edits a day
- 50 comments deleted a day
Suggested approvals
- A person approves archiving a page
- A person approves deleting a block
- A person approves deleting a comment
What the key must allow
- An internal integration you create
- Read, Update and Insert content; Read and Insert comments
- Only the pages you share with it
Good to know
- A page that is not shared with the integration cannot be reached.
- A database row takes that database's own property names. The agent reads them with the database first.
For your own account
- 1.In Notion, open Settings, Connections, Develop or manage integrations, and create an internal integration.
- 2.Give it Read content, Update content and Insert content.
- 3.Open each page your agent should reach and add the integration under Connections.
- 4.In Anlyon, open Actions, then Integrations, choose Notion and paste the integration's secret.
How do I call Notion from my agent's code? For one of your users, or for your own account.
Act for one of your users from your server, or connect your company's own Notion with the CLI.
import { Client, EndUserNotConnectedError } from "@anlyonhq/sdk";const anlyon = new Client({ apiKey: process.env.ANLYON_API_KEY! });try { const { data } = await anlyon .forUser(session.userId) .actions.invoke("notion-create-page", { parent_page_id: "7b1f2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", title: "Launch checklist" }); return { status: "done", grade: data.grade };} catch (error) { if (error instanceof EndUserNotConnectedError) { // The user connects their own Notion, then you call again. return { status: "connect_required", url: error.connectUrl }; } throw error;}Questions. Notion and AI agents.
Connect a Notion account in Anlyon, switch on the operations the agent may use, and call them from the TypeScript or Python SDK or over MCP. Each of your users connects their own account through a connect link, where they sign in on Notion's own consent page. Your agent sees the operations by name and never sees the credential.
Through Anlyon it can search, read and write the pages and databases you share with it. Reads change nothing. Writes are off until you switch them on, and every write leaves a receipt.
Yes. Every Notion action you enable is also an MCP tool on Anlyon's hosted MCP server, at https://api.anlyon.com/mcp. Add that address to Claude Code, Cursor or Codex and sign in. This is Anlyon's integration, not Notion's own MCP server, which has its own page here: Notion MCP server.
No. The token stays with Anlyon and is sent only in the request to Notion's API. No API returns it, to you, to the console or to an agent.
Other integrations. Under the same limits, approvals and receipts.
Available
Stripe
Payments · API key
Refunds under a money ceiling, and every customer, payment and invoice to read.
Available
GitHub
Code · Sign in
Issues, pull requests and code, in the repositories you choose.
Available
HubSpot
CRM · Sign in
Contacts, companies and deals: search them and change them.
- Anlyon app
- Available
- Your own app
- Recommended for production
