JAVASCRIPT · WOOCOMMERCE & GCP
woo-order-to-google-storage — WooCommerce Webhook Archival to Google Cloud Storage
woo-order-to-google-storage is an event-driven Google Cloud Function that captures WooCommerce order webhooks and archives immutable JSON receipts into Google Cloud Storage buckets. It verifies WooCommerce HMAC-SHA256 webhook signatures and partitions objects by date for BigQuery analytics and tax compliance.
$ gcloud functions deploy woo-order-gcs
Copy
GitHub ↗
GCS Write Latency
19 ms P50
Partition Layout
dt=YYYY-MM-DD/
Format
NDJSON / Parquet Ready
Idempotency
Order ID + Modified Hash
01. Interactive Workbench
02. Reference Implementation
03. Architecture & Specs
Interactive WooCommerce Webhook to GCS Partition Path & NDJSON Transformer
WooCommerce Order Webhook Summary
GCS Bucket Object Partition Strategy
Hive Date Partition: gs://woo-archive/dt=2026-10-31/order-88412.json
PII-Redacted BigQuery External Table NDJSON Stream
Object Versioning + 7-Year Tax Compliance Retention Lock
HMAC-SHA256 `X-WC-Webhook-Signature` Verification
Execute Pipeline ▶
Reset
Deterministic Execution Output & Telemetry
STATUS: READY // 0 ERRORS
JavaScript (GCS Archival Handler)
const { Storage } = require('@google-cloud/storage');
const storage = new Storage();
exports.wooOrderToGcs = async (message) => {
const order = JSON.parse(Buffer.from(message.data, 'base64').toString());
const datePrefix = (order.date_created || new Date().toISOString()).slice(0, 10);
const file = storage.bucket(process.env.GCS_BUCKET).file(`dt=${datePrefix}/order-${order.id}.json`);
await file.save(JSON.stringify(order) + '\n', { contentType: 'application/x-ndjson' });
};
Production Engineering Specifications
Repository: https://github.com/bhubbard/woo-order-to-google-storage
Live Studio: https://code.brandonhubbard.com/woo-order-to-google-storage/
Portal: https://code.brandonhubbard.com/
Install: gcloud functions deploy wooOrderToGcs --trigger-topic woo-orders
Design System: Brandon Hubbard Swiss Modernist (#0A0A0C / 1px Exposed Structural Grid)