Shopify Trigger

Start the workflow on an event of a Shopify shop.

v1.1.0Source

Install

Manage Shopify orders and products, and start a workflow when a store event happens, such as a new order or a product update. Use it for store sync and order automation.

Shopify@zerodot/shopifyInstall
  1. Open System, then Nodes.
  2. Find Shopify and click Install.
  3. Use the new nodes at once. You do not restart.

How it works

Shopify Trigger (trigger.shopify) is a trigger node in the Shopify package (@zerodot/shopify): Start the workflow on an event of a Shopify shop.

Starts a run on a Shopify webhook. Pick Authentication and Trigger On. The trigger knows all 59 topics, for example orders/create, orders/paid, products/update, customers/create, refunds/create, themes/publish, and app/uninstalled.

When the workflow is published, the trigger makes the webhook at Shopify (POST /webhooks.json). A webhook with the same topic and address is used again. When the workflow stops, the trigger removes it. The address of the trigger must be reachable from the internet.

Each request must have the headers X-Shopify-Topic, X-Shopify-Hmac-Sha256, X-Shopify-Shop-Domain, and X-Shopify-Api-Version. The trigger checks X-Shopify-Hmac-Sha256: the base64 HMAC-SHA256 of the raw body, with the secret of the credential. A request with a wrong signature gets status 401. A signed request for another topic is ignored. The output is the JSON body of the webhook.

The secret is appSecretKey for Access Token, sharedSecret for API Key, and clientSecret for OAuth2. Without a secret, the trigger refuses all requests.

Logins it can use

  • Shopify access token (shopify.accessToken): shopSubdomain, accessToken of a custom app, and appSecretKey. The subdomain is the part before .myshopify.com.
  • Shopify API key (shopify.apiKey): apiKey, password, shopSubdomain, and sharedSecret (for the trigger). The node sends them as Basic authentication.
  • Shopify OAuth2 (shopify.oauth2): shopSubdomain, clientId (Shopify calls it API key), and clientSecret (Shopify calls it API secret key). Connect the credential to sign in. The default scopes are write_orders read_orders write_products read_products. Use the Scope field to change them.

The Test button reads one product (GET /products.json?limit=1). The credential needs the read_products scope.

Guides and related hubs