Who is impacted
If any of your sync functions readnango.lastSyncDate to determine where to resume syncing, you are impacted by this migration.
To check, search your sync files for lastSyncDate. If you find references like nango.lastSyncDate or destructured equivalents, those syncs should be migrated to use checkpoints.
What is changing
nango.lastSyncDate is deprecated and replaced by checkpoints — a more flexible and resilient way to track sync progress.
With lastSyncDate, Nango automatically tracked the timestamp of the last completed sync run. Your function could read it but not set it, and it was always a timestamp. With checkpoints, you define the schema, you control when it’s saved, and you can store any type of progress marker — not just a date.
lastSyncDate (deprecated) | Checkpoints | |
|---|---|---|
| Type | Always a Date | Any schema you define with Zod |
| Control | Managed by Nango, read-only | You set it explicitly with saveCheckpoint() |
| Granularity | Updated once per completed run | Updated mid-execution, after each batch |
| Resilience | If a run fails, no progress is saved | Progress is saved incrementally — the next run resumes from the last checkpoint |
Checkpoints also replace the
syncType: 'incremental' field in your sync declaration. If your sync has a checkpoint schema, Nango treats it as incremental. If it doesn’t, Nango treats it as a full sync.Why this deprecation
lastSyncDate had two significant limitations:
-
No mid-run resilience. If a sync fetched 90% of its data and then failed, all progress was lost. The next run started over from the previous
lastSyncDate, re-fetching everything. -
Rigid type. The value was always a timestamp managed by Nango. Some APIs use cursors, page tokens, or composite markers to track progress —
lastSyncDatecouldn’t accommodate these.
Migration steps
Step 1: Add a checkpoint schema to your sync declaration
Add acheckpoint field to your createSync() call. In most cases, this is a single string field holding a timestamp:
Before:
syncType: 'incremental', remove it — the presence of the checkpoint field replaces it.
Step 2: Replace lastSyncDate reads with getCheckpoint()
Replace every reference to nango.lastSyncDate with a call to nango.getCheckpoint().
Before:
getCheckpoint() is async and returns null on first run or after a reset, just like lastSyncDate was null on the first execution.
Step 3: Add saveCheckpoint() calls after each batch
This is the most important change. With lastSyncDate, progress was saved automatically at the end of a run. With checkpoints, you save progress explicitly — and you should do it after every batch of records.
Before:
Step 4: Test locally
Use the CLIdryrun command with the --checkpoint flag to simulate resuming from a previous run:
Step 5: Deploy
Deploy as usual. On the first run after deployment,getCheckpoint() will return null (since no checkpoint has been saved yet), so the sync will perform a full initial fetch — just like it did on its first run with lastSyncDate. Subsequent runs will be incremental from the checkpoint.