Notion Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Notion MCP or direct API to search workspaces, create pages, update databases, and manage tasks through natural language.
Notion Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools and Triggers

Tools
Triggers
Add multiple content blocks (bulk, user-friendly)Efficiently adds multiple standard content blocks to a notion page in a single api call with automatic markdown parsing.
Append complex blocks (advanced, full control)Appends complex blocks with full notion block structure to a parent block or page.
Archive Notion PageArchives (moves to trash) or unarchives (restores from trash) a specified notion page.
Create commentAdds a comment to a notion page (via `parent page id`) or to an existing discussion thread (via `discussion id`); cannot create new discussion threads on specific blocks (inline comments).
Create Notion DatabaseCreates a new notion database as a subpage under a specified parent page with a defined properties schema; use this action exclusively for creating new databases.
Create Notion pageCreates a new empty page in a notion workspace.
Delete a blockArchives a notion block, page, or database using its id, which sets its 'archived' property to true (like moving to "trash" in the ui) and allows it to be restored later.
Duplicate pageDuplicates a notion page, including all its content, properties, and nested blocks, under a specified parent page or workspace.
Fetch Notion Block ChildrenRetrieves a paginated list of direct, first-level child block objects along with contents for a given parent notion block or page id; use block ids from the response for subsequent calls to access deeply nested content.
Fetch Notion block metadataFetches metadata for a notion block (or page, as pages are blocks) using its valid uuid; if the block has children, use fetch block contents to fetch their contents.
Fetch commentsFetches unresolved comments for a specified notion block or page id.
Fetch Notion DataFetches notion items (pages and/or databases) from the notion workspace, use this to get minimal data about the items in the workspace with a query or list all items in the workspace with minimal data
Fetch DatabaseFetches a notion database's structural metadata (properties, title, etc.
Fetch database rowRetrieves a notion database row's properties and metadata; use fetch block contents for page content blocks.
Get About MeRetrieves the user object for the bot associated with the current notion integration token, typically to obtain the bot's user id for other api operations.
Get about userRetrieves detailed information about a specific notion user, such as their name, avatar, and email, based on their unique user id.
Get page propertyCall this to get a specific property from a notion page when you have a valid `page id` and `property id`; handles pagination for properties returning multiple items.
Insert row databaseCreates a new page (row) in a specified notion database.
List usersRetrieves a paginated list of users (excluding guests) from the notion workspace; the number of users returned per page may be less than the requested `page size`.
Query databaseQueries a notion database for pages (rows), where rows are pages and columns are properties; ensure sort property names correspond to existing database properties.
Retrieve CommentTool to retrieve a specific comment by its id.
Retrieve Database PropertyTool to retrieve a specific property object of a notion database.
Search Notion pageSearches notion pages and databases by title; an empty query lists all accessible items, useful for discovering ids or as a fallback when a specific query yields no results.
Update blockUpdates an existing notion block's textual content or type-specific properties (e.
Update PageTool to update the properties, icon, cover, or archive status of a page.
Update row databaseUpdates or archives an existing notion database row (page) using its `row id`, allowing modification of its icon, cover, and/or properties; ensure the target page is accessible and property details (names/ids and values) align with the database schema and specified formats.
Update database schemaUpdates an existing notion database's title, description, and/or properties; at least one of these attributes must be provided to effect a change.

Connect Notion MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Notion tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Create a new Notion page titled "Project Roadmap"')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect Notion API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Notion Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Summarize all tasks due this week in Notion'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute Notion actions with your Agent

Why Use Composio?

AI Native Notion Integration

  • Supports both Notion MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Notion data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Notion access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Notion
  • Scoped, least privilege access to Notion resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Notion with Composio?

No, you can get started immediately using Composio's built-in Notion app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.