Skip to content

promptlyagentai/notion-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notion Integration for PromptlyAgent AI

Seamless Notion workspace integration for the PromptlyAgent AI Research Assistant.

Screenshots

Configure and use Notion integration through the PromptlyAgent interface:

Notion Integration Configuration

Configure Notion API token, browse workspace pages, and enable AI agent tools for Notion operations

Features

  • Knowledge import from Notion pages and databases
  • AI agent integration with Notion tools
  • Artifact storage to Notion pages
  • Full CRUD operations support (search, read, create, update, delete)
  • Livewire-powered configuration UI
  • Automatic content conversion between Markdown and Notion blocks

Installation

Via Composer (Local Development)

composer require promptlyagentai/notion-integration:@dev

The package will automatically register itself via Laravel's package discovery.

Configuration

  1. Navigate to Settings → Integrations → Notion in your PromptlyAgent application
  2. Add your Notion Internal Integration token
  3. Grant the required permissions:
    • Read content (required for knowledge import and search)
    • Create pages (optional, for AI-generated content)
    • Update pages (optional, for artifact synchronization)

Usage

Knowledge Import

Import Notion pages as knowledge documents for AI-powered research:

  1. Go to Knowledge → Add Knowledge → Notion
  2. Browse your Notion workspace
  3. Select pages to import
  4. Configure import options (include children, tags, privacy level)

AI Agent Integration

Enable the Notion agent to interact with your workspace using natural language:

  • "Find project notes in Notion"
  • "Create a summary page in Notion"
  • "Update the status page in Notion"

Artifact Storage

Automatically sync AI-generated artifacts to Notion:

  1. Enable artifact storage in integration settings
  2. Select default parent page
  3. Artifacts will sync automatically when created or updated

Architecture

This package demonstrates the integration pattern for PromptlyAgent AI. New integrations (Slack, Google Drive, etc.) should follow this structure.

Key Components

  • Provider: NotionIntegrationProvider - Implements integration contracts
  • Services: Content conversion, knowledge import, API communication
  • Tools: AI agent tools for Notion operations
  • UI: Livewire components for configuration and browsing

Package Structure

src/
├── NotionIntegrationServiceProvider.php  # Main service provider
├── Providers/
│   └── NotionIntegrationProvider.php     # Integration logic
├── Services/
│   ├── NotionService.php                 # Core API service
│   ├── NotionBlockConverter.php          # Content conversion
│   ├── NotionContentAnalyzer.php         # AI analysis
│   └── NotionKnowledgeSource.php         # Knowledge operations
├── Tools/                                # AI agent tools
└── Livewire/                             # UI components

Requirements

  • PHP 8.2 or higher
  • Laravel 11.0 or 12.0
  • Livewire 3.0 or higher
  • Active Notion workspace with Internal Integration
  • Notion Internal Integration token with appropriate permissions

Testing

# Run package tests
./vendor/bin/pest

# Run specific test
./vendor/bin/pest tests/Feature/NotionIntegrationProviderTest.php

Contributing

This package is part of the PromptlyAgent AI ecosystem. For contributions, please refer to the main repository guidelines.

License

The MIT License (MIT). Please see License File for more information.

Credits

Support

For issues and questions:

About

Notion Integration for PromptlyAgentAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors