Overview
Enable your agents to manage pages, databases, and content through Notion. Create and update pages, manage content blocks, organize knowledge bases, and streamline your documentation workflows with AI-powered automation.Prerequisites
Before using the Notion integration, ensure you have:- A CrewAI Enterprise account with an active subscription
- A Notion account with appropriate workspace permissions
- Connected your Notion account through the Integrations page
Setting Up Notion Integration
1. Connect Your Notion Account
- Navigate to CrewAI Enterprise Integrations
- Find Notion in the Authentication Integrations section
- Click Connect and complete the OAuth flow
- Grant the necessary permissions for page and database management
- Copy your Enterprise Token from Account Settings
2. Install Required Package
Available Actions
NOTION_CREATE_PAGE
NOTION_CREATE_PAGE
Description: Create a page in Notion.Parameters:
parent
(object, required): Parent - The parent page or database where the new page is inserted, represented as a JSON object with a page_id or database_id key.properties
(object, required): Properties - The values of the page’s properties. If the parent is a database, then the schema must match the parent database’s properties.icon
(object, required): Icon - The page icon.children
(object, optional): Children - Content blocks to add to the page.cover
(object, optional): Cover - The page cover image.
NOTION_UPDATE_PAGE
NOTION_UPDATE_PAGE
Description: Update a page in Notion.Parameters:
pageId
(string, required): Page ID - Specify the ID of the Page to Update. (example: “59833787-2cf9-4fdf-8782-e53db20768a5”).icon
(object, required): Icon - The page icon.archived
(boolean, optional): Archived - Whether the page is archived (deleted). Set to true to archive a page. Set to false to un-archive (restore) a page.properties
(object, optional): Properties - The property values to update for the page.cover
(object, optional): Cover - The page cover image.
NOTION_GET_PAGE_BY_ID
NOTION_GET_PAGE_BY_ID
Description: Get a page by ID in Notion.Parameters:
pageId
(string, required): Page ID - Specify the ID of the Page to Get. (example: “59833787-2cf9-4fdf-8782-e53db20768a5”).
NOTION_ARCHIVE_PAGE
NOTION_ARCHIVE_PAGE
Description: Archive a page in Notion.Parameters:
pageId
(string, required): Page ID - Specify the ID of the Page to Archive. (example: “59833787-2cf9-4fdf-8782-e53db20768a5”).
NOTION_SEARCH_PAGES
NOTION_SEARCH_PAGES
Description: Search pages in Notion using filters.Parameters:
searchByTitleFilterSearch
(object, optional): A filter in disjunctive normal form - OR of AND groups of single conditions.Available fields:query
,filter.value
,direction
,page_size
NOTION_GET_PAGE_CONTENT
NOTION_GET_PAGE_CONTENT
Description: Get page content (blocks) in Notion.Parameters:
blockId
(string, required): Page ID - Specify a Block or Page ID to receive all of its block’s children in order. (example: “59833787-2cf9-4fdf-8782-e53db20768a5”).
NOTION_UPDATE_BLOCK
NOTION_UPDATE_BLOCK
Description: Update a block in Notion.Parameters:
blockId
(string, required): Block ID - Specify the ID of the Block to Update. (example: “9bc30ad4-9373-46a5-84ab-0a7845ee52e6”).archived
(boolean, optional): Archived - Set to true to archive (delete) a block. Set to false to un-archive (restore) a block.paragraph
(object, optional): Paragraph content.image
(object, optional): Image block.bookmark
(object, optional): Bookmark block.code
(object, optional): Code block.pdf
(object, optional): PDF block.table
(object, optional): Table block.tableOfContent
(object, optional): Table of Contents block.additionalFields
(object, optional): Additional block types.
NOTION_GET_BLOCK_BY_ID
NOTION_GET_BLOCK_BY_ID
Description: Get a block by ID in Notion.Parameters:
blockId
(string, required): Block ID - Specify the ID of the Block to Get. (example: “9bc30ad4-9373-46a5-84ab-0a7845ee52e6”).
NOTION_DELETE_BLOCK
NOTION_DELETE_BLOCK
Description: Delete a block in Notion.Parameters:
blockId
(string, required): Block ID - Specify the ID of the Block to Delete. (example: “9bc30ad4-9373-46a5-84ab-0a7845ee52e6”).
Usage Examples
Basic Notion Agent Setup
Filtering Specific Notion Tools
Knowledge Base Management
Content Structure and Organization
Automated Documentation Workflows
Troubleshooting
Common Issues
Permission Errors- Ensure your Notion account has edit access to the target workspace
- Verify that the OAuth connection includes required scopes for Notion API
- Check that pages and databases are shared with the authenticated integration
- Double-check page IDs and block IDs for correct UUID format
- Ensure referenced pages and blocks exist and are accessible
- Verify that parent page or database IDs are valid when creating new pages
- Ensure page properties match the database schema when creating pages in databases
- Verify that property names and types are correct for the target database
- Check that required properties are included when creating or updating pages
- Ensure block content follows Notion’s rich text format specifications
- Verify that nested block structures are properly formatted
- Check that media URLs are accessible and properly formatted
- Ensure search queries are properly formatted and not empty
- Use valid field names in filter formulas:
query
,filter.value
,direction
,page_size
- Test simple searches before building complex filter conditions
- Verify that parent page or database exists before creating child pages
- Ensure proper permissions exist for the parent container
- Check that database schemas allow the properties you’re trying to set
- Ensure URLs for external images, PDFs, and bookmarks are accessible
- Verify that rich text formatting follows Notion’s API specifications
- Check that code block language types are supported by Notion
- Understand the difference between archiving (reversible) and deleting (permanent)
- Verify that you have permissions to archive or delete the target content
- Be cautious with bulk operations that might affect multiple pages or blocks
Getting Help
Need Help?
Contact our support team for assistance with Notion integration setup or troubleshooting.