sync-guide

Guides implementation of Notion Workers syncs with pagination, cursors, and deletion strategies.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill sync-guide-moneyplug
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sync-guide
Source: https://github.com/MoneyPlug/money-plug-hub-mobile/tree/main/.agents/skills/sync-guide
Command: npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill sync-guide-moneyplug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @notionhq/workers, and includes references (resource) components.

What problem does it solve? Building reliable data syncs into Notion databases requires handling pagination, rate limits, eventual consistency, and deletion detection correctly — mistakes like missing consistency buffers or non-advancing cursors cause permanent data loss or infinite loops. ## Core Features & Use Cases - Architecture Decision Framework: Choose between simple replace-mode syncs and backfill+delta sync pairs based on API change-tracking capability and dataset size. - Pagination & Cursor Patterns: Reference implementations for opaque cursors, page numbers, keyset (timestamp + id) pagination, and event-feed cursors drawn from Salesforce, Stripe, HubSpot, GitHub, and ServiceNow. - Production Edge Cases: Covers consistency buffers, HubSpot deadlock detection, ServiceNow flip-flop delete streams, and event anchors for backfill-to-delta transitions. - Use Case: Sync Stripe customers into a Notion database by pairing a manual replace-mode backfill with a 5-minute incremental delta sync reading the events feed with a 10-second consistency buffer. ## Quick Start Ask the agent to scaffold a Notion Workers sync for your external API, specifying the data source, whether it supports change tracking, and the desired schedule.

Frequently Asked Questions about sync-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Notion Workers sync for an external API?▼

Define a managed database with worker.database(), then register a sync with worker.sync() whose execute function returns changes, hasMore, and nextState. Choose replace mode for small datasets or pair a manual backfill with a scheduled incremental delta sync for APIs with change tracking.

When should I use replace mode vs incremental mode in a sync?▼

Use replace mode when the API lacks change tracking or the dataset is small enough to re-fetch fully; the runtime auto-deletes unseen records. Use incremental mode paired with a replace-mode backfill when the API supports updated_at filters or event feeds.

Why does my incremental sync permanently miss records?▼

The cursor never resets in incremental mode, so advancing it past records not yet indexed by an eventually consistent API skips them forever. Add a consistency buffer of 10-60 seconds so the cursor always lags behind the current time.

How do I handle deletions when the API has no delete endpoint?▼

Rely on a replace-mode backfill sync, which automatically deletes records not returned during a full cycle. Trigger it manually or on a slow schedule to clean up stale records that the delta sync cannot detect.

How do I avoid rate limits in Notion Workers syncs?▼

Create a pacer with worker.pacer() specifying allowedRequests and intervalMs, then call await pacer.wait() before every API request inside execute. A single pacer can be shared across multiple syncs, with the budget apportioned evenly.