Fix Dates That Break Webhooks

Roadblock: Stripe sends "1712345678" (unix), your CRM wants "2024-04-05". One line converts any unix timestamp to ISO — no more silent webhook failures.

The Snippet

// Unix timestamp (seconds or ms) → ISO 8601
const raw = Number(inputData.ts);
const ms = raw > 1e12 ? raw : raw * 1000; // handle both units
output = { iso: new Date(ms).toISOString() };

Implementation Steps

  1. Add a Code by Zapier step after your trigger
  2. Map the unix timestamp field to inputData.ts
  3. Use output.iso in later steps

All templates