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.
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;