-
Notifications
You must be signed in to change notification settings - Fork 5
Add Notion Webhook Support #14
Copy link
Copy link
Open
Description
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.notionwith 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
- Update
/docs/platforms.mdwith setup steps. - Mention manual webhook verification steps. See Notion Webhook Verification 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels