Skip to content

feat: add Notion connector - #353

Open
decipher3114 wants to merge 6 commits into
usemoss:mainfrom
decipher3114:feat/moss-connector-notion
Open

feat: add Notion connector#353
decipher3114 wants to merge 6 commits into
usemoss:mainfrom
decipher3114:feat/moss-connector-notion

Conversation

@decipher3114

@decipher3114 decipher3114 commented Jul 8, 2026

Copy link
Copy Markdown

Pull Request Checklist

Please ensure that your PR meets the following requirements:

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation (if applicable).
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Description

Summary

This PR adds a new moss-connector-notion package for ingesting Notion pages into Moss.

The connector:

  • Uses the official notion-client SDK.
  • Recursively fetches nested blocks for each page.
  • Handles pagination for both page search results and block children.
  • Supports optional search queries and client-side filtering.
  • Includes unit tests, integration tests, and documentation.

Fixes

Closes #352, closes #380


Demo Video

moss-connector-notion-demo.mp4

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Copilot AI review requested due to automatic review settings July 8, 2026 20:16
@CLAassistant

CLAassistant commented Jul 8, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Python package, moss-connector-notion, under packages/moss-data-connector/ to ingest Notion pages into Moss by searching accessible pages, recursively fetching each page’s full block tree, mapping pages to DocumentInfo, and creating a Moss index via ingest().

Changes:

  • Introduces NotionConnector (page search + recursive block fetching + pagination) and a standard ingest() helper for pushing docs into a new Moss index.
  • Adds unit + integration tests for pagination and recursive block fetching behavior.
  • Updates the moss-data-connector docs to list the new Notion connector package.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/moss-data-connector/README.md Adds moss-connector-notion to the connector list and table.
packages/moss-data-connector/moss-connector-notion/.gitignore Adds standard Python package/test ignores for the new connector.
packages/moss-data-connector/moss-connector-notion/README.md Documents installation, usage, auth, pagination, and testing for the Notion connector.
packages/moss-data-connector/moss-connector-notion/pyproject.toml Defines the new package metadata, dependencies, and tooling config (pytest/ruff/setuptools).
packages/moss-data-connector/moss-connector-notion/src/init.py Re-exports NotionConnector and ingest.
packages/moss-data-connector/moss-connector-notion/src/connector.py Implements the Notion page iterator, search pagination, and recursive block fetching.
packages/moss-data-connector/moss-connector-notion/src/ingest.py Implements ingest() helper (optionally auto-generating UUID doc IDs).
packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Adds unit tests for pagination and recursive block fetching.
packages/moss-data-connector/moss-connector-notion/tests/test_notion_integration.py Adds an env-gated integration test that creates a page, ingests it, queries it, then cleans up.
packages/moss-data-connector/moss-connector-notion/uv.lock Adds a lockfile capturing resolved dependencies for this package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py Outdated
Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py
Comment thread packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py Outdated
Comment thread packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Outdated
Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py
Comment thread packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 03:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py
Comment thread packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Outdated
Comment thread packages/moss-data-connector/moss-connector-notion/tests/test_notion.py Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py Outdated
Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py
Copilot AI review requested due to automatic review settings July 9, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Comment thread packages/moss-data-connector/moss-connector-notion/src/connector.py
Copilot AI review requested due to automatic review settings July 9, 2026 03:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@decipher3114

Copy link
Copy Markdown
Author

@HarshaNalluru I've resolved all the issues mentioned above

@HarshaNalluru

Copy link
Copy Markdown
Contributor

@decipher3114 thanks for the contribution, can you sign the CLA? #353 (comment)

@decipher3114

Copy link
Copy Markdown
Author

@HarshaNalluru I've signed the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector: Notion [Feature]: add moss-connector-notion

4 participants