Manage Notion pages, data sources, databases, blocks, comments, files, views, agents, and Enterprise administration.
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.
io.w6w.notionCreate 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.
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-legal-hold-users Admin: Add users to a legal hold. Requires an Enterprise organization bot token.
admin-add-permission-group-member Admin: Add a group member. Requires an Enterprise organization bot token.
admin-create-legal-hold Admin: Create a legal hold. Requires an Enterprise organization bot token.
admin-create-permission-group Admin: Create a group. Requires an Enterprise organization bot token.
admin-delete-agent Admin: Delete an agent in a space. Requires an Enterprise organization bot token.
admin-delete-permission-group Admin: Delete a group. Requires an Enterprise organization bot token.
admin-enqueue-space-export Admin: Enqueue a workspace export. Requires an Enterprise organization bot token.
admin-export-legal-hold Admin: Export a legal hold. Requires an Enterprise organization bot token.
admin-get-agent-credit-usage Admin: Get credit usage for an agent in a space. Requires an Enterprise organization bot token.
admin-get-agent-permissions Admin: Get a custom agent's sharing permissions. Requires an Enterprise organization bot token.
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. Requires an Enterprise organization bot token.
admin-get-content-pages-analytics-report Admin: Get content pages analytics report. Requires an Enterprise organization bot token.
admin-get-legal-hold Admin: Retrieve a legal hold. Requires an Enterprise organization bot token.
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. Requires an Enterprise organization bot token.
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. Requires an Enterprise organization bot token.
admin-list-legal-hold-pages Admin: List pages on a legal hold. Requires an Enterprise organization bot token.
admin-list-legal-hold-users Admin: List users on a legal hold. Requires an Enterprise organization bot token.
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. Requires an Enterprise organization bot token.
admin-list-mcp-client-connections Admin: List MCP client connections in an organization. Requires an Enterprise organization bot token.
admin-list-permission-group-members Admin: List group members. Requires an Enterprise organization bot token.
admin-list-permission-groups Admin: List groups. Requires an Enterprise organization bot token.
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. Requires an Enterprise organization bot token.
admin-release-legal-hold Admin: Release a legal hold. Requires an Enterprise organization bot token.
admin-remove-legal-hold-user Admin: Remove a user from a legal hold. Requires an Enterprise organization bot token.
admin-remove-permission-group-member Admin: Remove a group member. Requires an Enterprise organization bot token.
admin-retrieve-permission-group Admin: Retrieve a group. Requires an Enterprise organization bot token.
admin-revoke-mcp-client-connection Admin: Revoke an MCP client connection. Requires an Enterprise organization bot token.
admin-revoke-personal-access-token Admin: Revoke a personal access token in a workspace. Requires an Enterprise organization bot token.
admin-revoke-user-session Admin: Revoke a managed user's sessions. Requires an Enterprise organization bot token.
admin-update-agent-creation-policy Admin: Update who can create agents in a space. Requires an Enterprise organization bot token.
admin-update-agent-credit-limit Admin: Update credit limit for an agent in a space. Requires an Enterprise organization bot token.
admin-update-agent-permissions Admin: Update a custom agent's sharing permissions. Requires an Enterprise organization bot token.
admin-update-agent-status Admin: Disable or re-enable an agent in a space. Requires an Enterprise organization bot token.
admin-update-legal-hold Admin: Update a legal hold. Requires an Enterprise organization bot token.
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-permission-group Admin: Update a group. Requires an Enterprise organization bot token.
admin-update-permission-group-member Admin: Update a group member. Requires an Enterprise organization bot token.
admin-update-workspace-credit-limit Admin: Update the default agent credit limit for a workspace. Requires an Enterprise organization bot token.
append-block-children Insert blocks into a page or block, optionally choosing their position.
create-database-page Create a row in a data source. An existing Database ID works when the database contains exactly one data source.
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 Exchange an authorization code for an access and refresh token. Requires an OAuth Client connection (client ID and client secret).
get-many-database-pages Query database rows. Provide a Data Source ID, or a Database ID containing exactly one data source.
get-many-databases Walk data source search and retrieve unique database containers. Search indexing is not exhaustive.
introspect-token Introspect a token. Requires an OAuth Client connection (client ID and client secret).
list-databases Find shared database containers via data source search. Search indexing is not exhaustive. One page per call — pass `startCursor` back to walk.
refresh-token Exchange an authorization code for an access and refresh token. Requires an OAuth Client connection (client ID and client secret).
revoke-token Revoke a token. Requires an OAuth Client connection (client ID and client secret).
search-databases Search databases by title. Returns one page — pass `startCursor` back to walk.
send-file-upload Send binary contents to an upload created with Create File Upload. Supports individual multipart upload parts.
update-session Update a session. Starts or continues a session; event streams are returned after completion.
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>"
}
}
]
}admin-add-legal-hold-users admin-add-permission-group-member admin-create-legal-hold admin-create-permission-group 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.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { 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); npm install -g @w6w/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.
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.
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.
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.
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).
Notion declares its own checks, so its health is a property of the app rather than something the host guesses at.