Ecommerce and publishing

Two-way Shopify and Mautic marketing consent sync workflow

Short answer

This deterministic n8n workflow keeps email marketing consent aligned between Shopify and Mautic. Updated Shopify customers are created or matched in Mautic and added to or removed from the confirmed segment. In reverse, Mautic webhooks pass HMAC-SHA256 signature verification before updating consent through Shopify Admin GraphQL.

Catalogue ID
#1526
Functional nodes
20
Connections
19
Trigger
shopifyTrigger, webhook
AI layer
Deterministic
Business problem solved

Business problem solved

When a shopper unsubscribes inside Mautic but stays marked subscribed in Shopify, promotional emails continue from the wrong system and create GDPR compliance risk. One-way sync leaves consent records split.

Trigger

A Shopify trigger listens to customers/update events while a POST webhook receives Mautic subscription changes.

Connected systems

Connected systems

  • Shopify Trigger and Admin GraphQL
  • Mautic
  • Webhook and HMAC Crypto
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. Shopify Trigger (Trigger) (connects to Search for Contact by Email)
  2. 2. Accepts Marketing? (Logic and routing) (connects to Add to confirmed segment, Remove from confirmed…)
  3. 3. Accepts Marketing?1 (Logic and routing) (connects to Create a new contact, No Operation, do nothing)
  4. 4. No Operation, do nothing (Logic and routing)
  5. 5. Add to confirmed segment (Service and data)
  6. 6. Remove from confirmed… (Service and data)
  7. 7. Webhook (Trigger) (connects to Crypto, Set Shopify Subdomain)
  8. 8. Crypto (Service and data) (connects to If)
  9. 9. If (Logic and routing) (connects to GraphQL, No Operation, do nothing1)
  10. 10. No Operation, do nothing1 (Logic and routing)
  11. 11. GraphQL (Service and data) (connects to Customer exists?)
  12. 12. Marketing Consent… (Service and data)
  13. 13. Marketing Consent… (Service and data)
  14. 14. Mautic - Accepts Marketing? (Logic and routing) (connects to Marketing Consent…, Marketing Consent…)
  15. 15. Customer exists? (Logic and routing) (connects to Mautic - Accepts Marketing?, No Operation, do nothing2)
  16. 16. No Operation, do nothing2 (Logic and routing)
  17. 17. Set Shopify Subdomain (Service and data)
  18. 18. Search for Contact by Email (Service and data) (connects to Contact exists?)
  19. 19. Contact exists? (Logic and routing) (connects to Accepts Marketing?, Accepts Marketing?1)
  20. 20. Create a new contact (Service and data) (connects to Add to confirmed segment)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Shopify opt-in sync to Mautic

    Shopify customer updates search Mautic by email, create missing contacts and add or remove them from the confirmed segment.

  2. 02

    Mautic webhook HMAC verification

    Incoming Mautic webhooks pass through SHA256 HMAC signature verification against your shared webhook secret.

  3. 03

    Shopify GraphQL consent update

    GraphQL looks up the customer by email and runs customerEmailMarketingConsentUpdate for subscribed or unsubscribed states.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags, while Crypto HMAC checks and no-op branches guard invalid requests.

Production layer added by ALTAI

During live deployment, ALTAI adds echo-loop suppression locks, GraphQL userErrors alerting, API retry queues and a GDPR consent audit trail.

Frequently asked

Shopify and Mautic consent sync Frequently asked questions

In production we store recent sync state and exit early whenever the target platform already matches the incoming consent value.

Shopify exposes fine-grained email marketing consent mutations specifically through the Admin GraphQL API.

The Crypto node computes an HMAC-SHA256 digest of the raw request body and rejects payloads whose signature disagrees.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp