Sync Airtable usage rows into Tabs for billing

By General Input

When a new usage event lands in your Airtable tracker, find the matching customer in Tabs, log the event for billing, and stamp the row as synced.

Integrations

  • Airtable
  • Tabs

Type

Deterministic Code

Categories

  • Finance
  • Operations

Build a code workflow that syncs new usage events from an Airtable tracker into Tabs for billing. The trigger is a poll on Airtable, event type new_record, watching a table called Usage Events. The columns on that table are: Customer External ID (text), External ID Source (single select with values like SALESFORCE, HUBSPOT, NETSUITE), Event Type (text, matches a Tabs event type slug), Quantity (number), Event Timestamp (ISO 8601 date-time), Synced (checkbox), Tabs Event ID (text), and Sync Error (text). The workflow should only act on rows where Synced is false.

For each new row, run these steps in order:

1. Call the Tabs List Customers operation, filtered by the external ID and external ID source from the Airtable row, to resolve the Tabs customer UUID. Use the page-based pagination but we only need the first match.

2. If zero customers come back, call Airtable Update Record on the same row to set Sync Error to a clear message like "No Tabs customer found for {source} ID {externalId}" and leave Synced unchecked. Then stop for this row.

3. If a customer is found, call the Tabs Create Event operation with that customer UUID, the Event Type from the row, the Quantity from the row, and the Event Timestamp formatted as ISO 8601. Capture the returned event ID.

4. Call Airtable Update Record to set Tabs Event ID to the returned event ID, flip Synced to true, and clear the Sync Error column if it had a previous value.

Important behaviors: handle Tabs API errors by writing the error message into the Sync Error column on the Airtable row instead of throwing, so a single bad row never blocks future ones. Treat the Synced checkbox as the idempotency guard so reprocessing the same row is safe. Allow the user to configure the Airtable base ID, table name, and the exact column names at setup time so it works against their existing tracker without renaming fields.

Related prompts

Explore more prompts
Creator roster board for rebook, test, or pause callsRun your nutrition clients' weekly meal plans from one consoleInstagram UGC rights tracker and repost approval boardA verification desk for every document your team scansBrowse and shortlist creators without burning audit creditsGlobal operations exposure map for your sites and suppliersDeal sourcing kanban board for your Harmonic saved searchesProof client shoots and hand off the delivery album in one placeField service dispatch board that ranks the closest techVendor due diligence register with on-demand risk briefs