Skip to content

feat: Notion IntegrationΒ #3

@research-developer

Description

@research-developer

Overview

Add Notion integration for documentation sync and project management.

Webhook Support βœ… (New in 2024)

Notion now supports webhooks! Key events:

Events

  • page.content_updated - Page content changed
  • page.properties_updated - Page properties changed
  • database.page_added - New page added to database
  • database.page_updated - Page in database updated
  • comment.created / comment.updated - Comments on pages

Identification

  • Notion uses signature verification (details TBD)
  • Payload contains type, entity, data

Payload Structure

{
  "type": "page.content_updated",
  "entity": { "id": "page_id", "type": "page" },
  "data": {
    "parent": { "type": "database_id", "id": "xxx" }
  },
  "workspace_id": "xxx"
}

Polling Alternative

REST API for database queries:

  • POST /databases/{id}/query - Query with filters
  • Filter by last_edited_time for incremental sync
  • Rate limit: 3 requests/second

Tasks

  • Implement NotionPoller in polling/notion.py
  • Add Notion webhook handler
  • Add Notion config to CLI (notion_token)
  • Sync PR descriptions to Notion pages
  • Create Notion database for PR tracking

Use Cases

  1. Doc Sync: Keep Notion docs in sync with PRs
  2. Project Tracking: Auto-create Notion pages for PRs
  3. Comment Sync: Mirror PR comments to Notion
  4. Release Notes: Auto-generate release notes in Notion

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions