{"_id":"@agentforge-io/connectors-notion","_rev":"5-61c28c2e08881e1a62e63c300bf2a3d6","name":"@agentforge-io/connectors-notion","dist-tags":{"latest":"3.1.0"},"versions":{"1.0.0":{"name":"@agentforge-io/connectors-notion","version":"1.0.0","license":"MIT","_id":"@agentforge-io/connectors-notion@1.0.0","maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"dist":{"shasum":"3b9d15588952a8ac3acab75ee530eb692a8c1324","tarball":"https://registry.npmjs.org/@agentforge-io/connectors-notion/-/connectors-notion-1.0.0.tgz","fileCount":38,"integrity":"sha512-/R1XPTAKg8o5S7eTrWZPH87NfDSijpG5jFjLoSb60n585pZA9w9rJS8yppKhTkB2DlTpsWLgBJcgJaox+k7efg==","signatures":[{"sig":"MEUCIAELY0FWwSFgZwvYXSZmcgVUH/QuU4iAzzByWL7bdLf6AiEAsfLCX9lVmTadCClR5sZQEpF/qpBmfRPbAUUPyqzMKfI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75779},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7e307742ec7a1720bf5fbc05164dad2c98348f2d","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist *.tgz","build:watch":"tsc -p tsconfig.build.json --watch"},"_npmUser":{"name":"stupidmvp","email":"stupidmvp@gmail.com"},"_npmVersion":"10.8.2","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0","@agentforge-io/core":"*"},"peerDependencies":{"@agentforge-io/core":"^2.0.11"},"_npmOperationalInternal":{"tmp":"tmp/connectors-notion_1.0.0_1780073524273_0.15845399441039087","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@agentforge-io/connectors-notion","version":"1.0.1","license":"MIT","_id":"@agentforge-io/connectors-notion@1.0.1","maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"dist":{"shasum":"3634e6451bd19f987675eddaf7d90946ee986b67","tarball":"https://registry.npmjs.org/@agentforge-io/connectors-notion/-/connectors-notion-1.0.1.tgz","fileCount":38,"integrity":"sha512-NIRz2nLfrGjeYoKJ7XO6A5Ei6GPC4XrrLyH1e5U9r2eb4pvd1ZTRD785ycgKf/bPrD0YQndRVhLYY9vuAuPStg==","signatures":[{"sig":"MEUCIQD6IRpaT/34qwR87BKcV7bBjIhNpy+FHNOvn4oT6YqTLQIgKm/a7asjfBqB1pX14CvE3+j1FH9m1/7jo/iiEEL3ZHo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76380},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7e307742ec7a1720bf5fbc05164dad2c98348f2d","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist *.tgz","build:watch":"tsc -p tsconfig.build.json --watch"},"_npmUser":{"name":"stupidmvp","email":"stupidmvp@gmail.com"},"_npmVersion":"10.8.2","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0","@agentforge-io/core":"*"},"peerDependencies":{"@agentforge-io/core":"^2.0.15"},"_npmOperationalInternal":{"tmp":"tmp/connectors-notion_1.0.1_1780080642263_0.1420999625214694","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@agentforge-io/connectors-notion","version":"3.0.0","license":"MIT","_id":"@agentforge-io/connectors-notion@3.0.0","maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"dist":{"shasum":"a0755080cf7df812690e1a3e78556ad30fc9085a","tarball":"https://registry.npmjs.org/@agentforge-io/connectors-notion/-/connectors-notion-3.0.0.tgz","fileCount":38,"integrity":"sha512-YTkLmoYjQ6GelI6nfpJo56+Klj4w6ZRhaQEOizbH3c39PbGViwQ1wxKIS+b/a3IWQTg64lkd0NDwqjOEguYgcg==","signatures":[{"sig":"MEQCIBP4QaVrTRm01rILmshSEwNvEgrcLcOZQgFxA7Zc2tcHAiAU+kU6ECbijyyo1jz+aNEPVg2Pglr51jT7Jjyxx7kU4w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76381},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7986a6d41934228605fefece3e362e58fdf6da24","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist *.tgz","build:watch":"tsc -p tsconfig.build.json --watch"},"_npmUser":{"name":"stupidmvp","email":"stupidmvp@gmail.com"},"_npmVersion":"10.8.2","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0","@agentforge-io/core":"*"},"peerDependencies":{"@agentforge-io/core":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connectors-notion_3.0.0_1780877825706_0.3785483916378798","host":"s3://npm-registry-packages-npm-production"}},"3.0.1":{"name":"@agentforge-io/connectors-notion","version":"3.0.1","license":"MIT","_id":"@agentforge-io/connectors-notion@3.0.1","maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"dist":{"shasum":"122dca12293049260f9df026c8b2f7398ff9840a","tarball":"https://registry.npmjs.org/@agentforge-io/connectors-notion/-/connectors-notion-3.0.1.tgz","fileCount":38,"integrity":"sha512-sz0MgfYeeq17liPml1YYuinek3rCtfwkYmWRVIp7cZYIJUeTKJsabmrS3fn1N6MrzFqU+cYUrhihhSpRyxixXw==","signatures":[{"sig":"MEUCIQDX603bPuJln0vhb+7IMOsX0sBvw8ZmsGrEnICkusmRGAIgOHwRC8MfGZ2COD4dP53+yhaObl41peeBTKnupqcTQlg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76378},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2812194b7dceba20d7e6adc1dca4f1ec3008ea0e","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist *.tgz","build:watch":"tsc -p tsconfig.build.json --watch"},"_npmUser":{"name":"stupidmvp","email":"stupidmvp@gmail.com"},"_npmVersion":"10.8.2","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","directories":{},"_nodeVersion":"20.19.4","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^20.0.0","@agentforge-io/core":"*"},"peerDependencies":{"@agentforge-io/core":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/connectors-notion_3.0.1_1782089971900_0.8799776605545595","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@agentforge-io/connectors-notion","version":"3.1.0","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","build:watch":"tsc -p tsconfig.build.json --watch","clean":"rm -rf dist *.tgz"},"peerDependencies":{"@agentforge-io/core":"^4.0.1"},"devDependencies":{"@agentforge-io/core":"*","@types/node":"^20.0.0","typescript":"^5.0.0"},"_id":"@agentforge-io/connectors-notion@3.1.0","gitHead":"c0ffb76a466c0d9583ed826e22fc4991bfa58634","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-on+W5SaCnzBHCe72G6Bo2523JErKo1exAKYl0ypjqqbz07+4QNmQ9i3Ob5PnEyHcymt3t9FnCY9YnrxvMhuQfQ==","shasum":"ecafe0d8a2a7a1a9912b36cf60e35316f68c5af8","tarball":"https://registry.npmjs.org/@agentforge-io/connectors-notion/-/connectors-notion-3.1.0.tgz","fileCount":38,"unpackedSize":77480,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEQt0GQbLJnaZkiRf97ObetAZOrGD4ap/XUI+hJoNjN9AiAF9dQ4HCBbwAIhaa6s0iVQmXyUNTg2N2g3LypjiLbXJA=="}]},"_npmUser":{"name":"stupidmvp","email":"stupidmvp@gmail.com"},"directories":{},"maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/connectors-notion_3.1.0_1784903414175_0.7458613432423917"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T16:52:04.128Z","modified":"2026-07-24T14:30:14.489Z","1.0.0":"2026-05-29T16:52:04.446Z","1.0.1":"2026-05-29T18:50:42.403Z","3.0.0":"2026-06-08T00:17:05.837Z","3.0.1":"2026-06-22T00:59:32.044Z","3.1.0":"2026-07-24T14:30:14.327Z"},"license":"MIT","description":"Notion connector for AgentForge — search, read and write pages, query databases, append blocks, and leave comments on behalf of the authorized Notion user (workspace scoped to the pages they explicitly selected at consent).","maintainers":[{"name":"stupidmvp","email":"stupidmvp@gmail.com"}],"readme":"# @agentforge-io/connectors-notion\n\nNotion connector for AgentForge. Adds a 14-tool belt (search, pages, blocks,\ndatabases, comments) that any agent can use after the end user has\nauthorized via OAuth2.\n\nCompanion design doc: [`NOTION_CONNECTOR_SDD.md`](../../../NOTION_CONNECTOR_SDD.md)\nat the repo root.\n\n## Quickstart\n\n1. **Create a Notion public integration** at\n   https://www.notion.so/profile/integrations → **New integration** →\n   **Public** (NOT Internal — Internal integrations are workspace-bound\n   and don't speak OAuth).\n   - Type: **Public integration**\n   - Redirect URI: `https://<your-agentforge-host>/connectors/oauth/callback`\n   - Copy **OAuth client ID** + **OAuth client secret** from the OAuth\n     Domain & URIs tab.\n\n2. **Register the connector** in your host's bootstrap (or rely on the\n   platform's vault-driven wiring — `connectors.module.ts` already does\n   this if you set `NOTION_OAUTH_CLIENT_ID` /\n   `NOTION_OAUTH_CLIENT_SECRET` in Settings → Secrets):\n\n   ```ts\n   import { notionConnector } from '@agentforge-io/connectors-notion';\n\n   connectorRegistry.register(notionConnector({\n     clientId: env.NOTION_OAUTH_CLIENT_ID,\n     clientSecret: env.NOTION_OAUTH_CLIENT_SECRET,\n   }));\n   ```\n\n3. **End-user authorizes.** Each operator's user clicks **Connect** on\n   the Notion card. Notion's consent screen is **page-pick** — the\n   user explicitly chooses which pages and databases to expose. The\n   token only sees those + descendants.\n\n## Tools\n\n| Name | Purpose |\n|---|---|\n| **Discovery** | |\n| `notion_search` | THE entry point — find pages / databases. No `/pages` endpoint exists in Notion. |\n| `notion_get_self` | Bot user id + workspace name (debug + intro responses) |\n| `notion_list_users` | Workspace member list — resolves `name → user.id` for assignments |\n| **Page reads** | |\n| `notion_get_page` | Metadata + properties (NOT body) |\n| `notion_get_page_content` | Block tree (body) — paginated, recursive |\n| **Page writes** | |\n| `notion_create_page` | Create page under a DB (row) or another page (child) |\n| `notion_update_page` | Patch properties OR archive/restore |\n| **Block edits** | |\n| `notion_append_blocks` | Add notes / paragraphs / code to end of page or block |\n| `notion_update_block` | Edit one block (rename bullet, toggle to_do, fix typo) |\n| `notion_delete_block` | Soft-delete (~30 day restore window) |\n| **Databases** | |\n| `notion_get_database` | Schema — REQUIRED before `create_page` on a DB |\n| `notion_query_database` | Filter + sort rows; the equivalent of \"list_issues\" for Notion |\n| `notion_create_database` | Scaffold a new tracker DB from chat |\n| **Audit** | |\n| `notion_create_comment` | New page-thread OR reply to existing thread |\n\n## Consent model — important\n\nUnlike Slack / ClickUp / GitHub which grant account-wide access, **Notion\nmakes the user pick specific pages at consent time**. The token only sees\nthose + descendants. Consequences:\n\n- `notion_search` returns 0 hits for pages the user didn't include — the\n  pages exist, just not in the token's scope. Have the user\n  **Disconnect** → **Connect** and pick a wider selection.\n- `object_not_found` errors on `get_page` / `get_database` / etc. mean\n  the same thing — surface verbatim to the model so it can ask the user.\n- There is no \"expand consent\" API — every widening requires a full\n  reconnect.\n\n## Tokens\n\nOAuth grants long-lived workspace tokens. No `refresh_token`, no\n`expires_in`. Tokens invalidate when the user removes the integration\nfrom their workspace settings or rotates the OAuth App's secret.\n\nOn 401 the registry surfaces `auth_required` and the user reconnects.\n\n## Common gotchas\n\n- **Card shows \"Needs admin setup\".** Either `NOTION_OAUTH_CLIENT_ID` or\n  `NOTION_OAUTH_CLIENT_SECRET` is missing — check `/settings/secrets`.\n- **`redirect_uri does not match`.** The Redirect URI on the Notion\n  integration must match `/connectors/oauth/callback` byte-for-byte\n  (https, no trailing slash, correct host).\n- **`property does not exist` on `create_page`.** The properties payload\n  doesn't match the database schema. Call `notion_get_database` first to\n  learn the exact property names.\n- **`Notion-Version` mismatch in logs.** We pin `2022-06-28`. Notion\n  deprecates versions gradually; bumps come in package patch releases.\n- **\"This integration shows a warning during consent\".** Public\n  integrations start in Beta — Notion gates \"Verified Public\" behind a\n  manual review. Submit once a few tenants have authorized.\n","readmeFilename":"README.md"}