Shopify Custom Trigger icon

Shopify Custom Trigger

Receive Shopify webhook events through webhook subscriptions

Order

AI-generated

Summary

Starts a workflow when Shopify sends order webhooks. It registers Shopify webhook subscriptions through the Admin GraphQL API for one or more order events, verifies each incoming request's HMAC signature, and emits one item per event.

Inputs

  • authentication — Credential type to use: Admin API Credentials (access token or Dev Dashboard client credentials, default) or OAuth2. The credential must have a Webhook Secret (for client credentials the client secret is the fallback) or the node throws.
  • event (required) — Primary order event to subscribe to. Choices: Created (default), Updated, Paid, Cancelled, Fulfilled, Partially Fulfilled, Deleted, Edited, Risk Assessment Changed, Transaction Created.
  • additionalEvents — Extra order events to subscribe to in the same trigger. They are merged and de-duplicated with the primary event, and one Shopify subscription is created per topic.
  • triggerOptions.includeFields — Comma-separated payload fields (e.g. id,name,total_price) that Shopify should include in the webhook body. Leave empty for the full payload.
  • triggerOptions.metafieldNamespaces — Comma-separated metafield namespaces that Shopify should include in the payload.
  • triggerOptions.includeHeaders — When true, adds the received HTTP headers to the output as a headers field. Default is false.

Output shape

One item per received webhook. Its json has resource, topic (from X-Shopify-Topic, or UNKNOWN), event (friendly name such as 'Created' when the topic is known, otherwise the raw topic), shopDomain, webhookId, receivedAt (ISO timestamp) and payload (the Shopify webhook body). It also has headers if Include Headers is enabled.

Requests with a missing or invalid X-Shopify-Hmac-Sha256 signature get HTTP 401 and don't start the workflow. If the raw body isn't available the node returns HTTP 500. Valid requests get a 200 'OK' response immediately. When the workflow is activated, the node creates the subscriptions pointing at its webhook URL. If the configuration changed, it deletes the old subscriptions first. Deactivating the workflow deletes them. Shopify user errors or GraphQL errors fail activation.

Examples

Example 1: Handle new orders and payments

Authentication: Admin API Credentials; Event: Created; Additional Events: Paid. Credential includes a Webhook Secret.

Example 2: Lightweight cancelled-order notifications

Event: Cancelled; Options > Include Fields: id,name,total_price,email.

Example 3: Debug webhook delivery

Event: Updated; Options > Include Headers: true, to see X-Shopify headers alongside the payload.

Links

Discussion