Skip to content

feat: add Airtable CMS sync integration#127

Merged
liamwalder merged 14 commits intodevelopfrom
feat/airtable-sync
Apr 6, 2026
Merged

feat: add Airtable CMS sync integration#127
liamwalder merged 14 commits intodevelopfrom
feat/airtable-sync

Conversation

@tristan-mouchet
Copy link
Copy Markdown
Collaborator

@tristan-mouchet tristan-mouchet commented Apr 2, 2026

Summary

Add one-way Airtable-to-CMS sync integration, allowing users to connect Airtable bases/tables to CMS collections with manual field mapping, full and incremental sync via webhooks, and automatic webhook renewal.

Changes

  • Add Airtable app with API client, field mapping engine, and sync service
  • Add Airtable button to sync connected tables from CMS pages dirreclty
  • Add connection management UI with base/table selection and field mapping grid
  • Support all Airtable field types including multi-references, attachments, rich text (Markdown → TipTap), and rollups
  • Add manual and webhook-based auto-sync with setup, disable, and automatic renewal via daily cron
  • Validate webhook URL reachability before registering with Airtable
  • Track hidden airtable_id field per collection for record identity
  • Add structured toast error handling with flexible-width notifications
  • Add cron API route for daily webhook refresh (compatible with Vercel Cron)

Test plan

  • Connect an Airtable base and map fields to a CMS collection
  • Run a manual sync and verify records appear in the CMS
  • Enable auto-sync webhook and verify incremental updates propagate
  • Disable auto-sync and verify the webhook is deregistered
  • Attempt webhook setup on a non-HTTPS URL — should show clear error
  • Verify expired webhooks are detected and surfaced in the UI
  • Test cron endpoint refreshes webhooks expiring within 3 days
  • Confirm toast notifications auto-size for short and long messages

- Add human-readable field type labels in mapping UI
- Filter attachments by MIME type based on target CMS field
- Extract correct property from button/collaborator fields by CMS type
- Skip complex objects in lookup/rollup value transforms
- Hoist compatibility Sets to module scope for O(1) lookups
- Precompute mapping grid lookups with useMemo
- Fix stale connections reference after sync refresh
- Block collection deletion when Airtable connections exist
- Clean up Airtable webhooks on app disconnect
- Add disable auto-sync option in connection dropdown
- Add daily cron to refresh webhooks before expiration
- Clear webhook fields and show expiration notice on refresh failure
- Track webhookExpiredAt to surface expired state in UI
- Ping notification URL to detect auth/reachability issues early
- Use ToastError for structured title + description error toasts
@tristan-mouchet tristan-mouchet added the Feature request A new feature request label Apr 2, 2026
@tristan-mouchet tristan-mouchet self-assigned this Apr 2, 2026
@tristan-mouchet tristan-mouchet added the Feature request A new feature request label Apr 2, 2026
- Extract shared sync setup into prepareSyncState, classifyRecords,
  and executeBatchOperations so both full and incremental paths reuse
  the same logic
- Add listRecordsByIds using filterByFormula to fetch only changed
  records from Airtable
- Webhook handler now parses per-record changes from payloads and
  runs incremental sync, falling back to full sync above 100 records
Reuse the shared URL utility instead of an inline fallback chain,
picking up VERCEL_PROJECT_PRODUCTION_URL for zero-config Vercel deploys.

Made-with: Cursor
@liamwalder liamwalder merged commit 00e8d21 into develop Apr 6, 2026
3 checks passed
@liamwalder liamwalder deleted the feat/airtable-sync branch April 6, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request A new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants