Skip to content

Instantly share code, notes, and snippets.

@ridem
ridem / -Shopify-Sendy.md
Last active November 18, 2023 21:41
Synchronize Shopify customers with Sendy

Synchronize Shopify customers with Sendy subscribers

Sendy woudln't be the Mailchimp killer without a proper Shopify integration. There we go, thanks to the Shopify gem and some ActiveRecord awesomeness.

NB: The script always keep in sync Shopify's accepts_marketing field with Sendy's unsubscribed field. I added custom fields like country and order count as an example of what we can do with it.

Installation

First make sure that you have the right ruby install (with rbenv for instance), with the right gems installed (like activerecord, shopify_api, etc) and the right mysql packages for the activerecord adapter;