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

Stop Double Orders: Deduplicating Shopify Webhooks in n8n

Описание и применение

Вебхуки Shopify могут доставляться несколько раз, создавая дубли. Быстрый ответ, проверка подписи, удаление дубликатов по ID вебхука и идемпотентные записи в Google Sheets и CRM устраняют дубли.

Задача

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

Результат

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

Рабочий процесс

  • 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

Доказательства

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

Источник

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

Источник

  • Дата записи: 2026-11-02T09:29:07.815Z