migrating-nango-deletion-detection

Installation
SKILL.md

Migrating Nango Deletion Detection

Do this

  1. Find legacy usage:
    • deleteRecordsFromPreviousExecutions(
    • trackDeletes: / track_deletes
  2. For each sync + model that needs automatic deletion detection:
    • Add await nango.trackDeletesStart('ModelName') at the start of exec (before fetching/saving).
    • Replace await nango.deleteRecordsFromPreviousExecutions('ModelName') with await nango.trackDeletesEnd('ModelName').
    • Keep trackDeletesEnd after all batchSave/batchUpdate/batchDelete calls.
  3. Safety:
    • Only call trackDeletesEnd if the full dataset was fetched + saved between trackDeletesStart and trackDeletesEnd (otherwise you can cause false deletions).
    • Prefer letting exceptions bubble. If you catch, re-throw when data is incomplete.

Checkpointed full refresh (multi-execution)

  • Call trackDeletesStart('ModelName') at the beginning of each execution in the refresh window (it is safe/idempotent while the window is open).
  • Call trackDeletesEnd('ModelName') only in the execution that finishes saving the full dataset.
Related skills

More from nangohq/skills

Installs
69
Repository
nangohq/skills
First Seen
Mar 4, 2026