Permita que seus agentes gerenciem páginas, bancos de dados e conteúdos através do Notion. Crie e atualize páginas, gerencie blocos de conteúdo, organize bases de conhecimento e otimize seus fluxos de documentação com automação alimentada por IA.
parent (object, obrigatório): Parent - A página ou banco de dados pai onde a nova página será inserida, representado como um objeto JSON com uma chave page_id ou database_id.
Copy
Ask AI
{ "database_id": "DATABASE_ID"}
properties (object, obrigatório): Properties - Os valores das propriedades da página. Se o pai for um banco de dados, o schema deve corresponder às propriedades do banco de dados.
pageId (string, obrigatório): Page ID - Especifique o ID da Página a ser atualizada. (exemplo: “59833787-2cf9-4fdf-8782-e53db20768a5”).
icon (object, obrigatório): Icon - O ícone da página.
Copy
Ask AI
{ "emoji": "🥬"}
archived (boolean, opcional): Archived - Indica se a página está arquivada (excluída). Defina como true para arquivar a página. Defina como false para restaurar.
properties (object, opcional): Properties - Os valores das propriedades a serem atualizados na página.
Descrição: Obtém o conteúdo (blocos) de uma página no Notion.
Parâmetros:
blockId (string, obrigatório): Page ID - Especifique o ID de um Bloco ou Página para receber todos os seus blocos filhos na ordem correta. (exemplo: “59833787-2cf9-4fdf-8782-e53db20768a5”).
Descrição: Atualiza um bloco no Notion.
Parâmetros:
blockId (string, obrigatório): Block ID - Especifique o ID do Bloco a ser atualizado. (exemplo: “9bc30ad4-9373-46a5-84ab-0a7845ee52e6”).
archived (boolean, opcional): Archived - Defina como true para arquivar (excluir) um bloco. Defina como false para restaurar um bloco.
paragraph (object, opcional): Conteúdo do parágrafo.
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()