Background Sync
FanDesk keeps your data synchronized with external services automatically, using smart incremental sync to stay up-to-date without hammering APIs.
How Sync Works
When you connect an external service (Google, GitHub), FanDesk registers background sync jobs that run on a schedule. These jobs run server-side — you do not need to keep FanDesk open for sync to happen.
Google Calendar ──── every 5 min ────→ FanDesk
Gmail ──── every 60 sec ───→ FanDesk
Google Contacts ──── every 15 min ───→ FanDesk
GitHub Issues ──── every 10 min ───→ FanDesk
GitHub CI ──── every 5 min ────→ FanDesk
Sync Frequencies
| Service | Frequency | What Syncs |
|---|---|---|
| Gmail | Every 60 seconds | Inbox, Sent, Labels, Threads |
| Google Calendar | Every 5 minutes | Events, calendars, attendees |
| Google Contacts | Every 15 minutes | Full contact directory |
| GitHub Issues | Every 10 minutes | Issues from linked repositories |
| GitHub CI Status | Every 5 minutes | PR CI pass/fail status |
Incremental Sync
FanDesk uses incremental sync techniques to minimize API usage and keep sync fast:
Gmail Incremental Sync
Gmail sync uses history IDs — a Gmail API feature that lets FanDesk fetch only the changes since the last sync (new emails, label changes, deletions) instead of downloading everything.
- First sync: Full inbox download (may take a few minutes)
- Subsequent syncs: Only changes since the last sync
- This means sync stays fast even with thousands of emails
Calendar Incremental Sync
Calendar sync uses sync tokens from the Google Calendar API:
- First sync: Downloads all upcoming events
- Subsequent syncs: Only events created, modified, or deleted since the last sync
- Deletions are properly handled — events deleted in Google Calendar disappear from FanDesk
OAuth Token Refresh
Google OAuth tokens expire after a period of time. FanDesk automatically refreshes them:
- Refresh happens every 15 minutes proactively
- If a sync job encounters an expired token, it refreshes before retrying
- This is transparent to you — sync continues uninterrupted
If token refresh fails (e.g., you revoked access in Google settings), FanDesk shows a Reconnect prompt in Settings > Integrations.
Manual Sync
Force an immediate sync for any service:
- Go to the module that uses the service (Mail, Calendar, etc.)
- Click the refresh icon (circular arrow) in the top-right
- FanDesk triggers an immediate sync
- New data appears within a few seconds
Sync Status
Check the health of your syncs:
- Go to Settings > Integrations
- Each integration shows:
- Last synced: Time of most recent successful sync
- Status: Active, Error, or Reconnect needed
- Click Details on any integration to see error messages if something went wrong
Common Sync Issues
| Issue | Cause | Fix |
|---|---|---|
| Token expired | Google revoked or expired the session | Click Reconnect in Settings > Integrations |
| Rate limited | Too many API requests | FanDesk backs off automatically; wait a few minutes |
| Permission revoked | You removed FanDesk's access in Google settings | Reconnect and re-grant permissions |
| Sync paused | FanDesk server maintenance | Usually resolves within minutes |
What Sync Does Not Change
Sync is one-way for most data:
- Gmail: FanDesk reads your Gmail and lets you act on it. Actions (archive, reply, star) sync back to Gmail.
- Calendar: Two-way. Events created in FanDesk appear in Google Calendar. Changes in Google Calendar sync back.
- Drive: Read-only. FanDesk shows your files but does not modify them except via explicit actions.
- GitHub: Read-only sync of issues and CI status. Creating PRs or merging goes through GitHub directly.
Next: Learn about real-time updates in Real-time Updates.
Need help? Contact us at hello@fandesk.ai