FabricFabricHarness
EcosystemChannels

Notion

Handle Notion integration events with page-scoped access.

fh add channel notion
import { createNotionChannel } from '@fabric-harness/channels/notion';

export default createNotionChannel({
  verificationToken: process.env.NOTION_WEBHOOK_VERIFICATION_TOKEN!,
  agent: 'knowledge',
  onVerificationToken: (token) => console.info('Store the Notion verification token:', token),
});

Create a webhook subscription for POST /channels/notion/webhook, capture its one-time verification_token through onVerificationToken, and store it in the environment. The adapter answers verification requests, then verifies X-Notion-Signature, deduplicates by event ID, and keys sessions by workspace/entity.

Use commentOnNotionPage(ref, { token, parentId }) for governed comments.

Restrict the integration to explicitly shared pages and databases. See Notion webhooks.