Guard Stripe and Shopify webhooks with HMAC verification and idempotency
Ready for 3.0What this workflow does
This AI workflow has 26 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Slack, Redis, Google Sheets and Stripe and 4 more.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Extract Signature & Event Metadata (Code): runs custom JavaScript code
- Claim Retryable DLQ Rows (PostgreSQL) (Postgres): run a query
- Detect Payment Provider (Switch): routes items into 2 branches
- Has Retryable Events? (If): checks a condition and branches into true / false
- Compute Stripe HMAC-SHA (Crypto): hashes or encrypts values
- Compute Shopify HMAC-SHA (Crypto): hashes or encrypts values
- Respond 401 Unauthorized (Respond to Webhook): sends the response back to the webhook caller
- Alert Security Channel (Slack) (Slack): uses Slack
- Route Fulfillment by Provider (Switch): routes items into 2 branches
- Signature & Replay Valid? (If): checks a condition and branches into true / false
…plus 14 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (15)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Crypto
n8n-nodes-base.crypto - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - Slack
n8n-nodes-base.slack - Redis
n8n-nodes-base.redis - Google Sheets
n8n-nodes-base.googleSheets - Stripe
n8n-nodes-base.stripe - Shopify
n8n-nodes-base.shopify - Postgres
n8n-nodes-base.postgres - OpenAI
@n8n/n8n-nodes-langchain.openAi - Gmail
n8n-nodes-base.gmail - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow receives Stripe or Shopify payment webhooks, verifies each request’s HMAC signature (with replay protection for Stripe), and deduplicates retries using an external idempotency key store before acknowledging the webhook with a…