First-party app
Notion Notion

Notion

Manage Notion pages, data sources, databases, blocks, comments, files, views, agents, and Enterprise administration.

stable ProductivityDocuments & Files

About

Notion ships in the w6w first-party pack. It declares 119 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.notion
Version
0.3.0
Author
w6w
Licence
MIT
Categories
Productivity · Documents & Files

Overview

Create and update Notion pages using properties, blocks, Markdown, or templates. Create private workspace pages with OAuth or a personal access token, or choose a parent page or data source. Search shared content and query database rows with filters, sorting, and cursor pagination.

Manage databases, data sources and templates, blocks, comments, file uploads, views and view queries, users, custom emojis, meeting notes, agents, and sessions. Enterprise Admin actions cover legal holds, workspace exports, groups and members, token administration, agent management, and analytics reports.

Includes internal integration, OAuth, personal access token, Enterprise organization token, and OAuth client authentication. Existing workflow action keys remain available with compatibility handling for database IDs, archived flags, and block positions.

Build with Notion

Three routes to the same 119 actions. The Workflow tab is generated from Notion's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Admin: Add users to a legal hold

admin-add-legal-hold-users

Admin: Add users to a legal hold. Requires an Enterprise organization bot token.

Admin: Add a group member

admin-add-permission-group-member

Admin: Add a group member. Requires an Enterprise organization bot token.

Admin: Create a legal hold

admin-create-legal-hold

Admin: Create a legal hold. Requires an Enterprise organization bot token.

Admin: Create a group

admin-create-permission-group

Admin: Create a group. Requires an Enterprise organization bot token.

Admin: Delete an agent in a space

admin-delete-agent

Admin: Delete an agent in a space. Requires an Enterprise organization bot token.

Admin: Delete a group

admin-delete-permission-group

Admin: Delete a group. Requires an Enterprise organization bot token.

Admin: Enqueue a workspace export

admin-enqueue-space-export

Admin: Enqueue a workspace export. Requires an Enterprise organization bot token.

Admin: Export a legal hold

admin-export-legal-hold

Admin: Export a legal hold. Requires an Enterprise organization bot token.

Admin: Get credit usage for an agent in a space

admin-get-agent-credit-usage

Admin: Get credit usage for an agent in a space. Requires an Enterprise organization bot token.

Admin: Get a custom agent's sharing permissions

admin-get-agent-permissions

Admin: Get a custom agent's sharing permissions. Requires an Enterprise organization bot token.

Admin: Get credit usage for agents in a space

admin-get-agents-credit-usage

Admin: Get credit usage for agents in a space. Requires an Enterprise organization bot token.

Admin: Get ai usage analytics report

admin-get-ai-usage-analytics-report

Admin: Get ai usage analytics report. Requires an Enterprise organization bot token.

Admin: Get content pages analytics report

admin-get-content-pages-analytics-report

Admin: Get content pages analytics report. Requires an Enterprise organization bot token.

Admin: Retrieve a legal hold

admin-get-legal-hold

Admin: Retrieve a legal hold. Requires an Enterprise organization bot token.

Admin: Get workspace export status

admin-get-space-export-status

Admin: Get workspace export status. Requires an Enterprise organization bot token.

Admin: Get user activity analytics report

admin-get-user-activity-analytics-report

Admin: Get user activity analytics report. Requires an Enterprise organization bot token.

Admin: Get agents in a space

admin-get-workflows-metadata-for-space

Admin: Get agents in a space. Requires an Enterprise organization bot token.

Admin: List analytics reports

admin-list-analytics-reports

Admin: List analytics reports. Requires an Enterprise organization bot token.

Admin: List pages on a legal hold

admin-list-legal-hold-pages

Admin: List pages on a legal hold. Requires an Enterprise organization bot token.

Admin: List users on a legal hold

admin-list-legal-hold-users

Admin: List users on a legal hold. Requires an Enterprise organization bot token.

Admin: List workspaces on a legal hold

admin-list-legal-hold-workspaces

Admin: List workspaces on a legal hold. Requires an Enterprise organization bot token.

Admin: List legal holds

admin-list-legal-holds

Admin: List legal holds. Requires an Enterprise organization bot token.

Admin: List MCP client connections in an organization

admin-list-mcp-client-connections

Admin: List MCP client connections in an organization. Requires an Enterprise organization bot token.

Admin: List group members

admin-list-permission-group-members

Admin: List group members. Requires an Enterprise organization bot token.

Admin: List groups

admin-list-permission-groups

Admin: List groups. Requires an Enterprise organization bot token.

Admin: List personal access tokens in a workspace

admin-list-personal-access-tokens

Admin: List personal access tokens in a workspace. Requires an Enterprise organization bot token.

Admin: List users

admin-list-users

Admin: List users. Requires an Enterprise organization bot token.

Admin: Release a legal hold

admin-release-legal-hold

Admin: Release a legal hold. Requires an Enterprise organization bot token.

Admin: Remove a user from a legal hold

admin-remove-legal-hold-user

Admin: Remove a user from a legal hold. Requires an Enterprise organization bot token.

Admin: Remove a group member

admin-remove-permission-group-member

Admin: Remove a group member. Requires an Enterprise organization bot token.

Admin: Retrieve a group

admin-retrieve-permission-group

Admin: Retrieve a group. Requires an Enterprise organization bot token.

Admin: Revoke an MCP client connection

admin-revoke-mcp-client-connection

Admin: Revoke an MCP client connection. Requires an Enterprise organization bot token.

Admin: Revoke a personal access token in a workspace

admin-revoke-personal-access-token

Admin: Revoke a personal access token in a workspace. Requires an Enterprise organization bot token.

Admin: Revoke a managed user's sessions

admin-revoke-user-session

Admin: Revoke a managed user's sessions. Requires an Enterprise organization bot token.

Admin: Update who can create agents in a space

admin-update-agent-creation-policy

Admin: Update who can create agents in a space. Requires an Enterprise organization bot token.

Admin: Update credit limit for an agent in a space

admin-update-agent-credit-limit

Admin: Update credit limit for an agent in a space. Requires an Enterprise organization bot token.

Admin: Update a custom agent's sharing permissions

admin-update-agent-permissions

Admin: Update a custom agent's sharing permissions. Requires an Enterprise organization bot token.

Admin: Disable or re-enable an agent in a space

admin-update-agent-status

Admin: Disable or re-enable an agent in a space. Requires an Enterprise organization bot token.

Admin: Update a legal hold

admin-update-legal-hold

Admin: Update a legal hold. Requires an Enterprise organization bot token.

Admin: Deny or restore enterprise-managed MCP client access

admin-update-mcp-client-connection-enterprise-managed-access

Admin: Deny or restore enterprise-managed MCP client access. Requires an Enterprise organization bot token.

Admin: Update a group

admin-update-permission-group

Admin: Update a group. Requires an Enterprise organization bot token.

Admin: Update a group member

admin-update-permission-group-member

Admin: Update a group member. Requires an Enterprise organization bot token.

Admin: Update the default agent credit limit for a workspace

admin-update-workspace-credit-limit

Admin: Update the default agent credit limit for a workspace. Requires an Enterprise organization bot token.

Append Block Children

append-block-children

Insert blocks into a page or block, optionally choosing their position.

Archive Page

archive-page

Archive (soft-delete) a page. Reversible with restore-page.

Batch Manage Agents

batch-manage-agents

Apply many agent operations.

Cancel Session

cancel-session

Cancel a session.

Complete File Upload

complete-file-upload

Complete a multi-part file upload.

Create Comment

create-comment

Create a comment.

Create Data Source

create-data-source

Create a data source.

Create Database

create-database

Create a database.

Create Database Page

create-database-page

Create a row in a data source. An existing Database ID works when the database contains exactly one data source.

Create File Upload

create-file-upload

Create a file upload.

Create Meeting Note

create-meeting-note

Create a meeting note.

Create Page

create-page

Create a page in the workspace, under a page, or in a data source. Workspace pages require OAuth or a personal access token; internal integrations need a parent.

Create Token

create-token

Exchange an authorization code for an access and refresh token. Requires an OAuth Client connection (client ID and client secret).

Create View

create-view

Create a view.

Create View Query

create-view-query

Create a view query.

Delete Agent

delete-agent

Delete agent.

Delete Block

delete-block

Delete a block.

Delete Comment

delete-comment

Delete a comment.

Delete View

delete-view

Delete a view.

Delete View Query

delete-view-query

Delete a view query.

Get Agent

get-agent

Get agent.

Get Agent Insights

get-agent-insights

Get agent insights.

Get Async Task

get-async-task

Retrieve an async task.

Get Block

get-block

Retrieve a block.

Get Comment

get-comment

Retrieve a comment.

Get Data Source

get-data-source

Retrieve a data source.

Get Database

get-database

Retrieve a database.

Get Database Page

get-database-page

Retrieve a page.

Get File Upload

get-file-upload

Retrieve a file upload.

Get Many Blocks

get-many-blocks

Retrieve block children.

Get Many Database Pages

get-many-database-pages

Query database rows. Provide a Data Source ID, or a Database ID containing exactly one data source.

Get Many Databases

get-many-databases

Walk data source search and retrieve unique database containers. Search indexing is not exhaustive.

Get Many Users

get-many-users

List all users.

Get Page

get-page

Retrieve a page.

Get Page Markdown

get-page-markdown

Retrieve a page as markdown.

Get Page Property

get-page-property

Retrieve a page property item.

Get Plugin Directory

get-plugin-directory

Get a plugin directory.

Get Self

get-self

Retrieve your token's bot user.

Get Session

get-session

Retrieve a session.

Get Skill Directory

get-skill-directory

Get a skill directory.

Get User

get-user

Retrieve a user.

Get View

get-view

Retrieve a view.

Get View Query Results

get-view-query-results

Get view query results.

Introspect Token

introspect-token

Introspect a token. Requires an OAuth Client connection (client ID and client secret).

List Comments

list-comments

List comments.

List Custom Emojis

list-custom-emojis

List custom emojis.

List Data Source Templates

list-data-source-templates

List templates in a data source.

List Databases

list-databases

Find shared database containers via data source search. Search indexing is not exhaustive. One page per call — pass `startCursor` back to walk.

List File Uploads

list-file-uploads

List file uploads.

List Plugins

list-plugins

List skills plugins.

List Views

list-views

List views.

Move Page

move-page

Move a page.

Query Agents

query-agents

Query agents.

Query Data Source

query-data-source

Query a data source.

Query Meeting Notes

query-meeting-notes

Query meeting notes.

Query Session Events

query-session-events

Query session events.

Query Sessions

query-sessions

Query sessions.

Refresh Token

refresh-token

Exchange an authorization code for an access and refresh token. Requires an OAuth Client connection (client ID and client secret).

Restore Page

restore-page

Restore a previously archived page.

Revoke Token

revoke-token

Revoke a token. Requires an OAuth Client connection (client ID and client secret).

Search

search

Search by title.

Search Data Sources

search-data-sources

Search by title.

Search Databases

search-databases

Search databases by title. Returns one page — pass `startCursor` back to walk.

Search Pages

search-pages

Search by title.

Send File Upload

send-file-upload

Send binary contents to an upload created with Create File Upload. Supports individual multipart upload parts.

Update Agent Credit Limit

update-agent-credit-limit

Update agent credit limit.

Update Agent Status

update-agent-status

Update agent status.

Update Block

update-block

Update a block.

Update Comment

update-comment

Update a comment.

Update Data Source

update-data-source

Update a data source.

Update Database

update-database

Update a database.

Update Database Page

update-database-page

Update page.

Update Page

update-page

Update page.

Update Page Markdown

update-page-markdown

Update a page's content as markdown.

Update Session

update-session

Update a session. Starts or continues a session; event streams are returned after completion.

Update View

update-view

Update a view.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Notion's real ids.

{
  "manifestVersion": "2",
  "name": "notion-example",
  "steps": [
    {
      "id": "admin-add-legal-hold-users",
      "uses": {
        "app": "io.w6w.notion",
        "action": "admin-add-legal-hold-users",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "legalHoldId": "<legalHoldId>",
        "userIds": "<userIds>"
      }
    }
  ]
}

Here are some of the things you can do

  • Admin: Add users to a legal hold

    perform
    admin-add-legal-hold-users
  • Admin: Add a group member

    perform
    admin-add-permission-group-member
  • Admin: Create a legal hold

    perform
    admin-create-legal-hold
  • Admin: Create a group

    perform
    admin-create-permission-group
  • Admin: Enqueue a workspace export

    perform
    admin-enqueue-space-export

+114 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Notion, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Notion. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "create-page",
  payload: {
    // parentType: "<value>",
    // parentPageId: "<value>",
    // dataSourceId: "<value>",
    // parent: "<value>",
    // title: "<value>",
    // properties: "<value>",
    // markdown: "<value>",
    // children: "<value>",
    // content: "<value>",
    // template: "<value>",
    // markdownVersion: "<value>",
    // allowAsync: "<value>",
    // position: "<value>",
    // notifications: "<value>",
    // icon: "<value>",
    // cover: "<value>",
    // filterProperties: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action create-page --payload '{}'

Give an AI agent Notion — without giving it Notion's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.notion#admin-add-legal-hold-users",
    "input": {
      "legalHoldId": "<legalHoldId>",
      "userIds": "<userIds>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Notion connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Notion's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Notion itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Notion declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Notion platform status

quota

API quota headroom