# Airtable to CRM Sync

> Compare your Airtable contacts against HubSpot or Salesforce. Find the gaps, spot the mismatches, and fix them without spreadsheet gymnastics.

Source: https://cotera.co/solutions/sales/airtable-crm-sync

---

- **Team:** Sales
- **Tools:** Airtable, HubSpot
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 1 hr/sync

## How it works
1. **Read Airtable** — Pull all contacts from your Airtable source table
2. **Match in CRM** — Look up each contact by email in HubSpot or Salesforce
3. **Find Gaps** — Identify missing records and field mismatches
4. **Sync Data** — Optionally update the CRM with missing or fresher data

## Example requests
- Compare my Event Leads table against HubSpot by email and show mismatches
- Sync the Partnerships base to Salesforce — create any missing contacts
- Find leads in my Airtable that are not in HubSpot yet

## Prompt

```markdown
## Task

Compare contacts in an Airtable base against HubSpot (or Salesforce). Find records that exist in one system but not the other, flag mismatches, and update stale data.

## Input

The user provides:
- Airtable base ID and table name with their contacts
- Which CRM to sync with (HubSpot or Salesforce)
- The matching field (usually email)
- What to do with mismatches: report only, or update the CRM

**Example:** "Compare my 'Event Leads' Airtable table against HubSpot contacts by email. Update HubSpot with any missing phone numbers."

## Context

### Sync Strategy

1. Use @Airtable/Get Base Schema to understand the table structure
2. Use @Airtable/Search Records to pull all contacts from the Airtable table
3. For each contact, use @HubSpot/Search Contacts to find them by email in the CRM
4. Compare fields between the two systems
5. If updating: use @HubSpot/Update Contact to push missing or newer data to the CRM

### What to Compare

- Contact exists in Airtable but not in CRM (new lead)
- Contact exists in CRM but not in Airtable (missing from source)
- Fields that differ: phone, title, company, etc.
- Which record is more recent (if timestamps available)

### Rules

- Never overwrite CRM data unless the user explicitly asks
- Default to reporting mismatches rather than fixing them
- Match on email (case-insensitive)

## Output

**Sync Summary:**
- Total contacts in Airtable: X
- Found in CRM: Y
- Missing from CRM: Z (list names/emails)
- Field mismatches: N (list specific differences)

**If updating:**
- Records updated: X
- Fields changed per record

**Mismatches Table:**
| Name | Email | Field | Airtable Value | CRM Value |
|------|-------|-------|----------------|-----------|
```

## Related reading
- [We Built a CRM in Airtable. Then We Taught an Agent to Run It.](https://cotera.co/articles/airtable-crm-automation-guide.md)
- [Airtable vs Google Sheets: We Used Both for a Year. One Automated Better.](https://cotera.co/articles/airtable-vs-google-sheets-automation.md)

