Skip to content

feat: add Notion metadata extractor#516

Merged
ravisuhag merged 1 commit intomainfrom
feat/notion-extractor
Apr 18, 2026
Merged

feat: add Notion metadata extractor#516
ravisuhag merged 1 commit intomainfrom
feat/notion-extractor

Conversation

@ravisuhag
Copy link
Copy Markdown
Member

Summary

  • Adds a new Notion extractor that extracts page and database metadata from Notion workspaces via the Notion API
  • Emits document entities for both pages and databases with child_of, belongs_to, owned_by, and documented_by edges
  • Reads page block content to scan for URN references linking documentation to data assets
  • Supports filtering extraction to pages, databases, or both via extract config

Details

New files:

  • plugins/extractors/notion/notion.go — Main extractor with Config, Init, Extract
  • plugins/extractors/notion/client.go — HTTP client for Notion API (search, block children, bearer auth, cursor-based pagination)
  • plugins/extractors/notion/notion_test.go — 6 unit tests covering config validation, page/database extraction, URN detection, archived skipping
  • plugins/extractors/notion/README.md — Documentation
  • test/e2e/notion_file/notion_file_test.go — End-to-end test with mock server through full pipeline

Entities emitted:

Type Description
document Page metadata (title, timestamps, creator, URL)
document Database metadata (title, description, column names)

Edges emitted:

Type Source → Target Description
child_of document → document Page is a child of another page
belongs_to document → document Page belongs to a database
owned_by document → user Page/database creator
documented_by document → any URN references found in page block content

Closes #503 (Notion portion)

Test plan

  • Unit tests pass (go test -tags plugins ./plugins/extractors/notion/)
  • E2E test passes (go test -tags integration ./test/e2e/notion_file/)
  • go build ./... succeeds
  • Review edge types and entity properties for consistency

Extract page and database metadata from Notion workspaces via the Notion
API. Emits document entities for both pages and databases with child_of,
belongs_to, owned_by, and documented_by edges. Reads page block content
to scan for URN references linking documentation to data assets.

Closes #503 (Notion portion)
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor Ready Ready Preview, Comment Apr 18, 2026 10:59pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Warning

Rate limit exceeded

@ravisuhag has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 0 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 0 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3dbba36c-4b33-4999-b477-c14dd4c3acd3

📥 Commits

Reviewing files that changed from the base of the PR and between b560a76 and b578eee.

📒 Files selected for processing (6)
  • plugins/extractors/notion/README.md
  • plugins/extractors/notion/client.go
  • plugins/extractors/notion/notion.go
  • plugins/extractors/notion/notion_test.go
  • plugins/extractors/populate.go
  • test/e2e/notion_file/notion_file_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ravisuhag ravisuhag merged commit 7249353 into main Apr 18, 2026
57 checks passed
@ravisuhag ravisuhag deleted the feat/notion-extractor branch April 18, 2026 23:25
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.

Add documentation extractor for Confluence and Notion

1 participant