Airtable Integration Map

Operational connection map for every current Airtable dependency across the marketing site, portals, APIs, and webhook flows.

Active mapConnection pointsExecution orderValidated11 sections104 table rows1 code blocksLast updated 2026-03-09docs/airtable-integration-map.md

Document Summary

System-wide map of Airtable touchpoints, bases, tables, routes, automations, and blockers.

Airtable Integration Map

Status: active working map Canonical scope: Airtable touchpoints across marketing, portals, APIs, automations, and webhook handoffs Last updated: 2026-03-09

1. Runtime contract in code

Environment variables the app currently expects

Env varRequired nowPurposeNotes
AIRTABLE_API_KEYyesAirtable auth for all server-side CRUDValid locally as of 2026-03-08
AIRTABLE_PARENTS_BASE_IDyesParent/client/contracts baseRequired for clients + contracts
AIRTABLE_DOULAS_BASE_IDyesDoula/provider baseRequired for doula records
AIRTABLE_PRODUCTS_BASE_IDoptional for lead flowsFamily Favorites product baseUsed for product/resources content
AIRTABLE_MARKETING_BASE_IDno for intake cutover, yes for marketing dataMarketing content baseNeeded for blog/newsletter reads
AIRTABLE_ADMIN_BASE_IDno for intake cutover, yes for admin finance opsAdmin ops baseNeeded for admin payment workflows

Bases and tables currently wired in code

BaseLive tablesCode status
PARENTSParent Intake Forms, Parent-Doula Matches, Active Contracts, Parents Payments, Interview Status, Closed Contractswired for intake, matching, interviews, contracts, and parent payment receipts
DOULASTBC Doula Database, Provider Directorypartially wired
PRODUCTSamazon productswired for product content
MARKETINGFamily Favorites, Blog Posts, Newsletter Signupsbase is now recognized in code, field mappings still thin
ADMINAdmin Payments, Invoiceswired for the canonical internal contract-level payment ledger and invoice persistence

Tables explicitly missing in the current Airtable layer

DomainCurrent state in codeImpact
Paymentscanonical split is live in app codeclient receipts and admin payout ledger now persist through Airtable
InvoicesADMIN.Invoices is wireddoula invoice creation and invoice detail now persist through Airtable
InterviewsInterview Status table is wiredbooking, reschedule, and cancellation persist through Airtable
Match ResponsesParent-Doula Matches is wireddoula availability + client matches now use shared Airtable state
Doula Availability / Time OffTBC Doula Database stores serialized availability and time-off payloadsbooking availability now persists through Airtable-backed doula records

2. Current Airtable touchpoint matrix

SurfaceUser/system actionProject entry pointAirtable targetDirectionCurrent stateWhat must exist in Airtable
Marketing parent intake formparent submits intake/parent-intake-form -> /api/clients -> parent-intake.tsPARENTS.Parent Intake Formswritecode-complete; production validation still controlled because automations are activecorrect field names, record create permissions, follow-up automation
Marketing doula application formdoula submits application/doula-sign-up -> /api/doulas public application writeDOULAS.TBC Doula Databasewritelive; production validation still controlled because webhook side effects are activeapplication fields, onboarding status fields, follow-up automation
Marketing doulas directoryvisitor browses doulas/doulas -> /api/doulasDOULAS.TBC Doula Databasereadlive with Airtable fallback/mock fallbackonboarded doula records, application status values
Marketing provider directoryvisitor browses providers/resources/providers -> /api/providersDOULAS.Provider Directoryreadlive with Airtable fallback/mock fallbackprovider listing records and directory-safe fields
Client list / admin intake viewsadmin reads client/intake data/api/clients, /admin/intake-forms, /admin/clientsPARENTS.Parent Intake Formsreadlivestable field names for intake + client status
Client detail updatesadmin edits client record/api/clients/[id]PARENTS.Parent Intake Formswriteliveupdateable client/intake fields
Client conversionadmin converts approved intake into active client record/api/clients/[id]/convert, /admin/intake-forms/[id], /admin/clients/[id]PARENTS.Parent Intake Formswritelivedurable conversion metadata in Note, valid status transitions, same Airtable record remains canonical
Doula list / admin rosteradmin/directory reads doulas/api/doulas, /admin/doulas, /doula/profileDOULAS.TBC Doula Databasereadliveonboarded doula records and approval metadata
Doula detail updatesadmin edits doula/api/doulas/[id]DOULAS.TBC Doula Databasewritevalidated route, Airtable-dependentwritable doula profile/application fields
Doula approval workflowadmin approves a doula, assigns mentor, and controls provider visibility/api/doulas/[id]/approval, /admin/doula-applications/[id], /admin/doulas, /admin/mentors, /doula/mentorDOULAS.TBC Doula Database + DOULAS.Provider Directoryread + writeliveApplication Status, Notes, Assigned Mentor/Mentees, provider directory rows
Contract list and detailadmin/client/doula reads contract data/api/contracts, /api/contracts/[id]PARENTS.Active Contractsreadpartially wiredcontract rows with status, names, amounts
Contract creationadmin creates contract/api/contractsPARENTS.Active Contractswritevalidated route, Airtable-dependentcontract fields, linked workflow for signing/payment
Matching workflowadmin/doula/client matching actions/admin/matching, /doula/leads, /client/matchesPARENTS.Parent-Doula Matchesread + writeliveparent link, doula id + name, response status, source, notes, interview link; no doula contact info is stored on the match row
Interview workflowclient books, doula/admin tracks interview/client/search/[id], /client/appointments, /doula/calendar, /admin/matchingPARENTS.Interview Statusread + writelivematch link, interview datetime, status, outcome, notes
Parent-side payment trackingclient/admin payment visibility/api/payments, /client/payments, /admin/paymentsPARENTS.Parents Paymentsread + writelivecanonical external money-in ledger, one record per client payment receipt collected by TBC
Admin finance opsadmin reconciliation and bookkeeping/admin/payments, /doula/invoicesADMIN.Admin Paymentsread + writeliveinternal contract-level finance ledger for referral fee capture, payout state, and bookkeeping
Invoice persistencedoula submits payout invoice and reviews invoice detail/doula/invoices, /doula/invoices/new, /doula/invoices/[id], /api/invoicesADMIN.Invoices + PARENTS.Active Contracts + PARENTS.Parents Paymentsread + writeliveinvoice table, linked payment ids, linked contract ids, PandaDoc references from signed contracts
Payment matching webhookinbound payment notification/api/webhooks/paymentPARENTS.Parents Payments + PARENTS.Active Contractsread + writelive with signed webhook verification and duplicate-safe receipt reconciliation; invoice linkage now updates the shared payment ledgerspayment receipt table, contract economics, webhook secret
Zapier data feedZapier reads project data/api/zapier/dataclients/doulas/contracts/appointments/invoicesreadpartial, some TODOs remaintables for each requested entity
Zapier inbound syncZapier pushes action payloads/api/webhooks/zapiervarious tables via handlerswritesecurity hardened, business handlers still partialmatching action/table contracts
Admin statsadmin dashboard summary/api/admin/statsclients + doulas + contractsreadpartially wiredenough real records to replace mock stats
Product/content resourcesfamily favorites/resourcesproduct fetchersPRODUCTS.amazon productsreadwiredproduct rows and categories
Blog contentmarketing blog and CMSCMS/blog APIsMARKETING.Blog Postsread + writebase now recognized, field mapping still needs refinementusable content model, publish fields
Newsletter signupsmarketing signup capturefuture newsletter write pathMARKETING.Newsletter Signupswritebase now recognized, no app write path yetname/email fields and automation trigger

3. Current project-side Airtable dependencies

Core Airtable module

Primary file:

  • airtable.ts

What it currently owns:

  • base selection
  • table selection
  • field mappers for Client, Doula, Contract, Product
  • generic CRUD wrappers
  • filter builders
  • duplicate detection for parent intake

What it does not fully own yet:

  • explicit Airtable availability/time-off tables
  • live PandaDoc credentials, template activation, and production webhook registration

Specialized Airtable mapping layer

Parent intake mapper:

  • parent-intake.ts

This is now the canonical public intake field contract. It must match the live Airtable field names exactly.

Routes that rely directly on Airtable availability

RouteRead/writeAirtable fallback behavior
/api/clientsread + writeread falls back to mock; parent intake write requires Airtable
/api/clients/[id]read + writeread fallback exists; write requires Airtable
/api/doulasread + writeread fallback exists; write requires Airtable
/api/doulas/[id]read + writeread fallback exists; write requires Airtable
/api/contractsread + writeread fallback exists; write requires Airtable
/api/contracts/[id]read + writeread fallback exists; write requires Airtable
/api/paymentsread + writelive Airtable-backed receipt and admin-ledger views
/api/payments/[id]read + writelive Airtable-backed receipt updates and admin payout-state updates
/api/appointmentsread + writelive Airtable-backed interview CRUD
/api/appointments/[id]read + writelive Airtable-backed interview CRUD
/api/invoicesread + writelive Airtable-backed invoice create/list endpoint
/api/invoices/[id]read + writelive Airtable-backed invoice detail/update endpoint
/api/admin/statsreaduses Airtable when configured
/api/zapier/datareadpartial Airtable coverage with TODOs
/api/webhooks/paymentread + write side effectssignature-verified webhook path with idempotent receipt reconciliation against Parents Payments and Active Contracts

4. What must exist inside Airtable for the next implementation wave

Launch-critical cutover set

Needed forBaseTableMust exist before cutover?Notes
Parent intake writePARENTSParent Intake Formsyesfield names must match mapper in parent-intake.ts
Parent follow-up automationPARENTSautomation on Parent Intake Formsyessends confirmation + account-create prompt
Doula application writeDOULASTBC Doula Databaseyesmust support public application field set
Doula follow-up automationDOULASautomation on TBC Doula Databaseyessends confirmation + account-create prompt
Contract workflowPARENTSActive Contractsyesalready partially wired
Match responsesPARENTSParent-Doula Matchesyes for WORK-220live app path now reads/writes here via /api/matches; first-class response fields now exist, and app metadata is still stored in Notes as structured TBC_MATCH_META payload
InterviewsPARENTSInterview Statusyes for WORK-286 / WORK-221table exists, field mapping + app contract still needed
Parent-side paymentsPARENTSParents Paymentsyes for real reconciliationlive app mapping now persists client payment receipts
Admin-side paymentsADMINAdmin Paymentsyes for finance opslive app mapping now persists payout state and bookkeeping metadata
InvoicesADMINInvoicesyeslive Airtable-backed payout invoice table with PandaDoc IDs sourced from Active Contracts
Doula availabilityDOULASTBC Doula Databaseyeslive app mapping persists Interview Availability JSON and Interview Time Off JSON directly on the doula record

Airtable automations that the app expects or will expect

AutomationTriggerCurrent app dependencyOwner
Parent intake follow-upnew parent intake recordmarketing intake success flow assumes Airtable sends confirmation + next-step emailAirtable
Doula application follow-upnew doula application recordmarketing doula application success flow assumes Airtable sends confirmation + next-step emailAirtable
Requested doula unavailablematch response marks requested doula unavailable/api/matches owns the single notification path and stamps the Airtable match record so duplicate sends are blockedApp + Airtable
Account invite / activation handoffapproved intake/application state changefuture Clerk re-enable depends on this linkageAirtable + Clerk
Interview syncappointment created/rescheduled/cancelledfuture Google Calendar / Meet pathAirtable + Google
Payment reconciliation follow-upmatched receipt or duplicate-safe retry resultadmin/payment visibility and notificationsAirtable + Plaid/Zapier

5. Current blockers and drift

AreaCurrent blockerConsequence
Parent intakeauth is fixed, real write path still needs live submit verificationWORK-218 is no longer blocked by credentials, only by end-to-end validation
Doula applicationapp path is wired; live create verification is still intentionally controlledWORK-219 code path is complete, but production validation should respect active webhook side effects
Match responsesapp mapping is now live in /api/matchesWORK-220 is implemented; client matches and doula availability now share Airtable-backed state
InterviewsInterview Status is the canonical shared interview tableWORK-286 is implemented; booking, reschedule, and cancellation now persist through /api/appointments
Payments/invoicespayment ledgers, receipt reconciliation, invoice persistence, and PandaDoc send/status/webhook scaffolding are in code; live PandaDoc activation is still pendingWORK-364, WORK-293, WORK-367, WORK-368, and WORK-374 are implemented; WORK-375 remains open
DocsAIRTABLE-SCHEMA.md still describes an older modeleasy to wire the wrong tables/fields if used blindly

6. Active Airtable automations and live-side-effect risk

Parent Database

Confirmed active automations:

  • Parent Sign Up Created
  • Postpartum Check-In!
  • First Birthday Email
  • Final Payment Reminder
  • Email response to referral form
  • Parent - Hired to Contract
  • New Contracts to Bookkeeping Spreadsheet
  • Post to Availability
  • Closed Contracts

Key confirmed trigger:

  • Parent Sign Up Created
    • trigger: record created in Parent Intake Forms
    • actions: sends email
    • branch logic: Kaiser Benefit?

Risk implication:

  • a real insert into Parent Intake Forms is not a harmless test write
  • it can trigger Gmail, Slack, Google Sheets, and downstream contract/availability workflows

Doula Database

Confirmed active automations:

  • Directory Doula Confirmation Email With Payment Link
  • [TBC Doula Database] Send Webhook when Record is Updated
  • [Doula Directory] Send Webhook when Record is Created
  • [TBC Doula Database] Send Webhook when Record is Created copy

Confirmed inactive automations:

  • New Doula Sign Up Email Confirmation With Doula Profile Form
  • Update Record via Form V2
  • [Join The Team Form Submission] Send Webhook when Record is Created ...
  • Yurii

Risk implication:

  • writes to TBC Doula Database and Provider Directory can trigger webhook side effects
  • the public doula application destination table still needs to be chosen explicitly before any live submit test

Family Favorites

Confirmed active automations:

  • Send Webhook [Record Updated]
  • Send Webhook [Record Created]

Risk implication:

  • product/content table edits can fire webhooks immediately

Marketing

No automation screenshots were provided for Marketing.

Current assumption:

  • treat Marketing as potentially side-effectful until explicitly verified otherwise

Payments / TBC Admin Database

  • user confirmed the old Payments base was deleted
  • any screenshots of that base should be treated as stale
  • TBC Admin Database now exists with Admin Payments
  • no active automation screenshots were provided yet for TBC Admin Database

7. Safe testing rules for Airtable cutover work

These are mandatory until the production automations are fully cataloged.

  1. Do not run live create/update tests against Parent Intake Forms while create-trigger automations are enabled unless the user explicitly approves the side effects.
  2. Do not assume a "test record" is safe. A single insert can trigger Gmail, Slack, Google Sheets, and contract/availability workflows.
  3. Do not run any delete operations against Airtable production bases.
  4. Prefer one of these testing modes, in order:
    • sandbox/test base copy
    • temporary automation disablement during a controlled test
    • production write with explicit operator approval and known side effects
  5. Any production write test must use:
    • a clearly labeled test identity
    • a unique email
    • a single insert-only action
    • no cleanup delete unless explicitly approved

8. Canonical table-role decisions

These need explicit decisions before more write paths are wired.

Doula application destination

Current ambiguity:

  • TBC Doula Database has a form called Doula Profile Form
  • Provider Directory has a form view called Doula Intake Form

Decision required:

  • which table is the canonical destination for public doula applications?

Recommended default:

  • TBC Doula Database for internal/application records
  • Provider Directory for public/provider listing records only
  • this is now the live app behavior for approval, directory publication, and mentorship

Payments domain

Canonical model:

  • old Payments base is deleted
  • TBC Admin Database exists with Admin Payments
  • Parent Database contains Parents Payments
  • Active Contracts is the canonical contract-economics record once PandaDoc metadata is ingested
  • PandaDoc send/status/webhook scaffolding now exists in the app code, but live activation still depends on production credentials and webhook registration
  • Parents Payments is the canonical external money-in ledger
  • Admin Payments is the canonical internal contract-level finance and payout ledger

Relationship model:

  • one Active Contracts record exists per signed PandaDoc contract
  • one contract can have many Parents Payments rows
  • one contract should have one Admin Payments row

Field ownership:

  • Active Contracts
    • total contract value
    • deposit due
    • balance due
    • referral fee percent
    • referral fee amount
    • doula payout obligation
    • Kaiser billing owner / handling
    • PandaDoc reference
  • Parents Payments
    • parent/client
    • contract
    • payment stage (deposit, final, other)
    • gross amount received
    • payment method / external reference
    • paid date
    • receipt status
  • Admin Payments
    • contract
    • total received to date
    • remaining due
    • referral fee captured
    • doula payout due
    • payout status / paid date / payout method
    • bookkeeping notes

Operational rule:

  • client-facing pages must not use Admin Payments as the source of truth for money received
  • admin payout and referral-fee state must not derive only from Parents Payments without contract context

9. Connection map

flowchart LR
  subgraph Marketing["Marketing Site"]
    PI["/parent-intake-form"]
    DS["/doula-sign-up"]
    DL["/doulas"]
  end

  subgraph Portals["Client / Doula / Admin Portals"]
    CI["Client portal"]
    DP["Doula portal"]
    AP["Admin portal"]
  end

  subgraph App["Next.js API + mapping layer"]
    APIClients["/api/clients"]
    APIDoulas["/api/doulas"]
    APIContracts["/api/contracts"]
    APIPayments["/api/payments"]
    APIAppointments["/api/appointments"]
    APIStats["/api/admin/stats"]
    APIWebhookPayment["/api/webhooks/payment"]
    APIWebhookZapier["/api/webhooks/zapier"]
    AirtableLib["lib/airtable.ts"]
    ParentMapper["lib/parent-intake.ts"]
  end

  subgraph Airtable["Airtable"]
    ParentsBase["Parent Database"]
    DoulasBase["Doula Database"]
    ProductsBase["Family Favorites base"]
    MarketingBase["Marketing base"]
    AdminBase["TBC Admin Database"]
    MissingOps["Missing ops tables\n(Invoices / Availability / Time Off)"]
  end

  subgraph Automation["Automations and external systems"]
    AirtableAutos["Airtable automations"]
    Zapier["Zapier"]
    Plaid["Plaid"]
    Clerk["Clerk"]
    Google["Google Calendar / Meet"]
  end

  PI --> APIClients
  DS --> APIDoulas
  DL --> APIDoulas
  CI --> APIClients
  DP --> APIDoulas
  AP --> APIStats
  AP --> APIContracts
  AP --> APIPayments
  CI --> APIAppointments
  DP --> APIAppointments

  APIClients --> ParentMapper
  ParentMapper --> AirtableLib
  APIDoulas --> AirtableLib
  APIContracts --> AirtableLib
  APIPayments --> AirtableLib
  APIAppointments --> AirtableLib
  APIStats --> AirtableLib

  AirtableLib --> ParentsBase
  AirtableLib --> DoulasBase
  AirtableLib --> ProductsBase
  AirtableLib --> MarketingBase
  AirtableLib --> AdminBase
  AirtableLib -. required next .-> MissingOps

  ParentsBase --> AirtableAutos
  DoulasBase --> AirtableAutos
  AirtableAutos --> Clerk
  AirtableAutos --> Google

  Plaid --> APIWebhookPayment
  Zapier --> APIWebhookPayment
  Zapier --> APIWebhookZapier
  APIWebhookPayment --> APIPayments
  APIWebhookPayment --> APIContracts
  APIWebhookZapier --> AirtableLib

10. Immediate execution order for the Airtable call

OrderWork itemWhy first
1add MARKETING and ADMIN base support to the Airtable layerkeeps code aligned with the real workspace
2catalog active automations and live side effects by baseprevents accidental production-triggered writes
3confirm the live field contract for TBC Doula Database so public submissions stay compatible with active automationskeeps WORK-219 durable
4implement the canonical Parents Payments + Admin Payments contract-ledger model in app codecompleted
5validate Parent Intake Forms fields against parent-intake.tskeeps WORK-218 implementation honest
6review whether Parent-Doula Matches needs first-class fields for response timestamps and notification markers or whether Notes metadata is sufficientdetermines whether WORK-220 needs a cleanup pass later
7map Interview Status into the app’s interview modelunlocks WORK-286 and later WORK-221
8run one controlled live write only after automation risk is accepted or neutralizedcloses WORK-218 safely

11. Hard truths

  • The current codebase is not built around one single Airtable base. It is already a multi-base model.
  • Parent intake is the closest public lead flow to production. Doula application is next. Matching, interviews, and payment ledgers are now Airtable-backed.
  • Payments are no longer structurally ambiguous. The remaining work is invoice approval workflow polish plus live PandaDoc activation, not ledger ownership, invoice persistence, or receipt dedupe.
  • A live Airtable write is not equivalent to a harmless database insert. In this workspace, it can trigger real outbound automations immediately.
  • If the call tries to redesign the entire Airtable architecture from scratch, you will lose time. The highest-return move is targeted cutover of the next four missing workflows.