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.
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.
Copy
Ask AI
{ "database_id": "DATABASE_ID"}
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.
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.
Copy
Ask AI
{ "emoji": "🥬"}
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.
Available fields: query, filter.value, direction, page_size
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”).
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.
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseTools# Get enterprise tools (Notion tools will be included)enterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")# Create an agent with Notion capabilitiesnotion_agent = Agent( role="Documentation Manager", goal="Manage documentation and knowledge base in Notion efficiently", backstory="An AI assistant specialized in content management and documentation.", tools=[enterprise_tools])# Task to create a meeting notes pagecreate_notes_task = Task( description="Create a new meeting notes page in the team database with today's date and agenda items", agent=notion_agent, expected_output="Meeting notes page created successfully with structured content")# Run the taskcrew = Crew( agents=[notion_agent], tasks=[create_notes_task])crew.kickoff()
from crewai_tools import CrewaiEnterpriseTools# Get only specific Notion toolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token", actions_list=["notion_create_page", "notion_update_block", "notion_search_pages"])content_manager = Agent( role="Content Manager", goal="Create and manage content pages efficiently", backstory="An AI assistant that focuses on content creation and management.", tools=enterprise_tools)# Task to manage content workflowcontent_workflow = Task( description="Create a new project documentation page and add structured content blocks for requirements and specifications", agent=content_manager, expected_output="Project documentation created with organized content sections")crew = Crew( agents=[content_manager], tasks=[content_workflow])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")knowledge_curator = Agent( role="Knowledge Curator", goal="Curate and organize knowledge base content in Notion", backstory="An experienced knowledge manager who organizes and maintains comprehensive documentation.", tools=[enterprise_tools])# Task to curate knowledge basecuration_task = Task( description=""" 1. Search for existing documentation pages related to our new product feature 2. Create a comprehensive feature documentation page with proper structure 3. Add code examples, images, and links to related resources 4. Update existing pages with cross-references to the new documentation """, agent=knowledge_curator, expected_output="Feature documentation created and integrated with existing knowledge base")crew = Crew( agents=[knowledge_curator], tasks=[curation_task])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")content_organizer = Agent( role="Content Organizer", goal="Organize and structure content blocks for optimal readability", backstory="An AI assistant that specializes in content structure and user experience.", tools=[enterprise_tools])# Task to organize content structureorganization_task = Task( description=""" 1. Get content from existing project pages 2. Analyze the structure and identify improvement opportunities 3. Update content blocks to use proper headings, tables, and formatting 4. Add table of contents and improve navigation between related pages 5. Create templates for future documentation consistency """, agent=content_organizer, expected_output="Content reorganized with improved structure and navigation")crew = Crew( agents=[content_organizer], tasks=[organization_task])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")doc_automator = Agent( role="Documentation Automator", goal="Automate documentation workflows and maintenance", backstory="An AI assistant that automates repetitive documentation tasks.", tools=[enterprise_tools])# Complex documentation automation taskautomation_task = Task( description=""" 1. Search for pages that haven't been updated in the last 30 days 2. Review and update outdated content blocks 3. Create weekly team update pages with consistent formatting 4. Add status indicators and progress tracking to project pages 5. Generate monthly documentation health reports 6. Archive completed project pages and organize them in archive sections """, agent=doc_automator, expected_output="Documentation automated with updated content, weekly reports, and organized archives")crew = Crew( agents=[doc_automator], tasks=[automation_task])crew.kickoff()