Synchronization
How Notion content becomes searchable context.
Vercel invokes GET /cron/sync every six hours. POST /v1/sync triggers the same job manually.
Each resource follows an incremental flow:
- Read current published Notion records.
- Compare
last_edited_timeand content hash with stored records. - Fetch content and create embeddings only for changed records.
- Upsert changed records.
- Remove records no longer present in source database.
Database changes happen only after new content and embeddings are ready. Failed records retain their last searchable version.