This script checks a given sheet for new entries, and adds them as customers to Shopify if they don't already exist in Shopify.
-
Create a Google spreadsheet with first name in column 'A', last name in column 'B', email address in column 'C', and date in column 'D'.
-
Click Tools > Script Editor. This brings you to the Apps Script editor.
-
Copy the contents of
src/Code.js
and paste into the script editor. -
Change
MY_SPREADSHEET_ID
,MY_SHEET
,MY_STORE_NAME
, andMY_API_KEY
as appropriate. -
Save the script.
-
Run the script to trigger permissions approval, even if your spreadsheet is blank: Click Run > Run Function > myWrapper.
-
When prompted, click Review permissions and Allow. You will only need to do this once.
If you get a warning that This app isn't verified continue with the verification process by clicking Advanced and then scroll down and click the grey text at the bottom that says Go to (Copy this) Script to send content
-
After granting permission, repeat Step 6 whenever you have new entries in your sheet. Alternately, you can create a Trigger to have the script run automatically.