Working Proof · Gumroad → Airtable Sync
A Gumroad → Airtable sync that says “success” while your table is wrong.
Green webhook runs hide duplicated retries, unnormalized cents and timestamps, and workflows you cannot safely replay when something drops.
Why most Gumroad → Airtable builds break silently
CAUSE 01
Non-idempotent webhook handling
Gumroad retries Ping webhooks whenever an endpoint times out or returns a transient error. Without checking whether sale_id already exists before creating a record, every retry writes a duplicate sale.
CAUSE 02
Missing or poorly mapped fields
Key fields (sale_id, email, price, product_id, created_at) arrive with inconsistent types and formatting: prices in cents (integer or string), mixed-case emails with whitespace, and varying timezone offsets. Unvalidated mappings silently write wrong totals or blank cells.
CAUSE 03
No safe way to re-run or backfill
If a scenario stops mid-batch or you need to replay recent sales after an outage, re-running a naive workflow creates duplicate rows across your table instead of converging on the same state.
The fix: idempotent upsert + explicit schema
Download mapping schema (JSON)Explicit field mapping & normalization
Every incoming Gumroad payload is validated and normalized before writing: email trimmed and lowercased, price converted from integer/string cents to exact 2-decimal USD using Decimal arithmetic, and created_at normalized to UTC ISO-8601.
Deduplication on sale_id
sale_id is enforced as the primary idempotency key. Before any insert, the sync checks whether that sale_id already exists in Airtable and discards retries deterministically.
Safe re-run (upsert)
Replaying the same webhook or an entire historical batch produces zero duplicate rows. Run 2 on the exact same 6 payloads inserts 0 records and leaves the 4-row table untouched.
Per-row audit log
Every processed event emits a structured outcome (inserted or skipped_duplicate) with its normalized fields so you can verify the table against Gumroad line by line.
| Gumroad field | Airtable column | Airtable type | Normalization rule |
|---|---|---|---|
| sale_id | Sale ID | singleLineText (unique key) | Trim string; lookup key for deduplication |
| Customer Email | Trim whitespace and convert to lowercase | ||
| price | Price (USD) | currency | Cents (int or string) ÷ 100 via Decimal, 2 decimals |
| product_id | Product ID | singleLineText | Trim string; required non-empty |
| created_at | Sale Timestamp (UTC) | dateTime | Parse ISO-8601 (Z or offset) → UTC YYYY-MM-DDTHH:MM:SSZ |
Real execution output on sample Gumroad payloads
Generated directly by python3 scripts/gumroad_airtable_demo.py. Six incoming webhook events include two duplicate retries (rows 3 and 5 for gm_sale_90411 and gm_sale_90412), mixed-case emails, string/integer cents, and a -05:00 offset timestamp.
Incoming events
6
Inserted
4
Skipped duplicates
2
Clean Airtable rows
4 ($272.50)
Run 1 — Per-event sync log (6 payloads)
| Row | sale_id | price | product_id | status | |
|---|---|---|---|---|---|
| 1 | gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | inserted |
| 2 | gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | inserted |
| 3 | gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | skipped_duplicate |
| 4 | gm_sale_90413 | [email protected] | 19.50 | prod_prompt_vault | inserted |
| 5 | gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | skipped_duplicate |
| 6 | gm_sale_90414 | [email protected] | 75.00 | prod_notion_ops | inserted |
Final Airtable table — 4 clean normalized rows
| sale_id | price | product_id | created_at (UTC) | |
|---|---|---|---|---|
| gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | 2026-11-18T09:14:22Z |
| gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | 2026-11-18T10:05:11Z |
| gm_sale_90413 | [email protected] | 19.50 | prod_prompt_vault | 2026-11-18T11:42:05Z |
| gm_sale_90414 | [email protected] | 75.00 | prod_notion_ops | 2026-11-18T14:20:00Z |
Re-run verification (Run 2 on the exact same 6 payloads)
0 inserted · 6 skipped_duplicate · 4 rows unchanged=== Run 1: Webhook Batch Log (6 incoming events) === | Row | sale_id | email | price | product_id | status | | --- | --- | --- | --- | --- | --- | | 1 | gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | inserted | | 2 | gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | inserted | | 3 | gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | skipped_duplicate | | 4 | gm_sale_90413 | [email protected] | 19.50 | prod_prompt_vault | inserted | | 5 | gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | skipped_duplicate | | 6 | gm_sale_90414 | [email protected] | 75.00 | prod_notion_ops | inserted | Run 1 summary: inputs=6, inserted=4, skipped_duplicate=2, airtable_rows=4, clean_total_usd=272.50 === Final Airtable Table (4 clean rows) === | sale_id | email | price | product_id | created_at | | --- | --- | --- | --- | --- | | gm_sale_90411 | [email protected] | 49.00 | prod_notion_ops | 2026-11-18T09:14:22Z | | gm_sale_90412 | [email protected] | 129.00 | prod_automation_kit | 2026-11-18T10:05:11Z | | gm_sale_90413 | [email protected] | 19.50 | prod_prompt_vault | 2026-11-18T11:42:05Z | | gm_sale_90414 | [email protected] | 75.00 | prod_notion_ops | 2026-11-18T14:20:00Z | Run 2 (idempotent re-run): inputs=6, inserted=0, skipped_duplicate=6, airtable_rows=4, unchanged=True Assertions passed: 6 inputs -> 4 inserted, 2 skipped_duplicate; re-run unchanged.
Want this wired to your Gumroad account and Airtable base?
Share your table columns and field types — I will map the exact upsert workflow to your base structure and verify it on your recent sales.