I Got Tired of Manually Logging Invoices, So I Wired Webhooks Straight to a Google Sheet
说明与用途
在 n8n 中创建的自动化工作流,接收发票 webhook,验证 HMAC 签名,使用幂等性检查去重,并将记录追加到 Google Sheets,消除了手动记录和数据丢失问题。
问题
Repeatedly rebuilding invoice‑logging automations for each payment provider caused friction due to varying payloads, failure modes, and duplicate handling.
结果
The workflow reliably records invoices, prevents duplicates, and surfaces errors, eliminating manual logging and reducing loss of data under load.
工作流
- Webhook – entry point for all executions
- HMAC verify – checks signature before parsing
- Idempotency check – drops events with previously processed id
- Append to Sheets – writes normalized record as a row
- Error branch – collects failures and surfaces them
证据
I kept hitting the same friction: every time a payment provider fired an event, I rebuilt the same automation from scratch.
The order matters: verifying before parsing means a malformed or hostile body never reaches code that acts on it.
An error branch that only appends to a file is not an error branch; it has to end somewhere a human looks.
- 记录日期: 2026-11-01T20:58:46.764Z