[Integration] Map & test Notion integration #30

Open
opened 2026-03-23 08:38:39 -07:00 by pyr0ball · 0 comments
Owner

Notion — Job Pipeline Sync

The Notion integration is the primary pipeline export target — push approved/applied jobs to a Notion database for tracking.

Current state

The IntegrationBase subclass exists at scripts/integrations/notion.py. The standalone scripts/sync.py already implements Notion sync via config. This task is to wire the new integration framework to the existing sync script and validate end-to-end.

Tasks

Mapping

  • Document required credentials: Notion API token, target database ID
  • Map field schema: how Peregrine job columns → Notion database properties
  • Document config file format: config/integrations/notion.yaml
  • Verify NotionIntegration.connect() stores config correctly
  • Verify NotionIntegration.test() validates token + DB access via Notion API

Implementation

  • Wire NotionIntegration.sync(jobs) to call scripts/sync.py::sync_to_notion()
  • Confirm /api/settings/system/integrations/notion/connect stores credentials
  • Confirm /api/settings/system/integrations/notion/test returns live validation result
  • Confirm /api/tasks/sync triggers Notion push when integration is connected

Testing

  • Integration test: connect with valid token → test returns true
  • Integration test: connect with invalid token → test returns false with clear error
  • End-to-end: approve a job → run sync → verify it appears in Notion database
  • Verify synced status is set on the job record after successful push

Acceptance criteria

  • Connection UI in Settings → Integrations shows Notion card with token + database_id fields
  • Test button validates live against Notion API
  • Sync runs without error on a real Notion workspace
## Notion — Job Pipeline Sync The Notion integration is the primary pipeline export target — push approved/applied jobs to a Notion database for tracking. ### Current state The `IntegrationBase` subclass exists at `scripts/integrations/notion.py`. The standalone `scripts/sync.py` already implements Notion sync via config. This task is to wire the new integration framework to the existing sync script and validate end-to-end. ### Tasks **Mapping** - [ ] Document required credentials: Notion API token, target database ID - [ ] Map field schema: how Peregrine job columns → Notion database properties - [ ] Document config file format: `config/integrations/notion.yaml` - [ ] Verify `NotionIntegration.connect()` stores config correctly - [ ] Verify `NotionIntegration.test()` validates token + DB access via Notion API **Implementation** - [ ] Wire `NotionIntegration.sync(jobs)` to call `scripts/sync.py::sync_to_notion()` - [ ] Confirm `/api/settings/system/integrations/notion/connect` stores credentials - [ ] Confirm `/api/settings/system/integrations/notion/test` returns live validation result - [ ] Confirm `/api/tasks/sync` triggers Notion push when integration is connected **Testing** - [ ] Integration test: connect with valid token → test returns true - [ ] Integration test: connect with invalid token → test returns false with clear error - [ ] End-to-end: approve a job → run sync → verify it appears in Notion database - [ ] Verify `synced` status is set on the job record after successful push ### Acceptance criteria - Connection UI in Settings → Integrations shows Notion card with token + database_id fields - Test button validates live against Notion API - Sync runs without error on a real Notion workspace
pyr0ball added this to the Public Launch milestone 2026-03-23 08:38:39 -07:00
pyr0ball added the
feature-request
label 2026-03-23 08:38:39 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#30
No description provided.