Skip to content

Add Notion Webhook Support #14

@Prateek32177

Description

@Prateek32177

We want to add webhook support for Notion in tern. Notion sends events for database changes, page updates, and more via integrations.

Tasks

Webhook Handler

  • Implement /src/platforms/notion.ts.
  • Normalize payloads into tern’s event format.

Platform Config

  • Add platformConfigs.notion with supported events (e.g., database/updated, page/updated, database/created).

Test Cases

  • Add JSON fixtures for 3+ events (database updated, page updated, database created).
  • Write Jest tests in /tests/notion.test.ts.

Docs

Acceptance Criteria

  • Notion handler implemented
  • Manual webhook verification supported
  • Tests with 3+ event types
  • Docs updated

Final Integration Testing

To complete a new platform integration in Tern, please ensure the signature verification works correctly:

  • Trigger a webhook event from the platform’s dashboard (use the “Send Test Event” option if available).
  • Verify the signature using the platform’s signing secret / HMAC.
  • The event should pass verification if the signature is correct.
  • The event should fail verification if the signature is invalid.

Add a test case in Jest covering both valid and invalid signature scenarios.

This ensures that the integration reliably validates incoming webhook events before processing.

Helpful Links: Notion Webhooks Docs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions