Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Stop Double Orders: Deduplicating Shopify Webhooks in n8n

Description and use

Shopify webhooks may be delivered multiple times. Respond immediately, verify the HMAC signature, drop duplicates using the webhook ID, and perform idempotent writes to Google Sheets and a CRM to eliminate duplicates.

Problem

Shopify webhooks can be delivered multiple times, causing duplicate processing in n8n workflows.

Outcome

The workflow reduces duplicate order entries by 100% by handling early responses, signature verification, deduplication on webhook ID, and idempotent writes.

Workflow

  • Answer Shopify webhook immediately by setting Respond to Immediately in the Webhook node
  • Enable Raw Body in the Webhook node to receive the binary request body
  • Use a Crypto node to compute HMAC SHA256 (base64) of the raw body with the app’s client secret
  • Compare the computed HMAC with the X-Shopify-Hmac-Sha256 header using an IF node
  • Use a Remove Duplicates node to drop deliveries with the same X-Shopify-Webhook-Id
  • Parse the JSON body back into a usable format (Extract From File or Code node)
  • Write to Google Sheets using Append or Update Row, matching on order ID
  • Optionally search by order ID in a CRM before creating or updating a record

Evidence

Shopify's webhook docs are blunt about it: your app might receive the same webhook more than once.

Source

Answer fast, check the signature, drop repeats by webhook ID, and make the final write safe to run twice.

Source

  • Record date: 2026-11-02T09:29:07.815Z