Skip to content

Every 30 minutes

Copy new Shopify customers to Google Sheets

New Shopify customers are added to a Customers tab with name, email, marketing consent, country, orders and amount spent.

Runs
Every 30 minutes
Apps
Google Sheets, Shopify
AI
Not needed
Access
read_customers; Google Sheets read+write

Send this to your assistant

Create a ClickRuntime automation: every 30 minutes, add new Shopify customers to the Customers tab of my sheet with created date, name, email, whether they accept email marketing, country, number of orders and total spent.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Shopify's customer list is fine inside the admin, but loyalty programmes, wholesale follow-ups, mailing lists in other tools and simple growth charts all tend to start from a spreadsheet.

This automation adds every new Shopify customer to a sheet within half an hour, with their email, marketing consent, country and what they have spent so far.

Small store owners, community and retention managers and bookkeepers use it to have one shared, sortable list of who is buying.

What you get out of it

  • New buyers in one list

    Every new customer appears in the sheet without exports.

  • Consent beside each email

    Filter to subscribed customers before any campaign.

  • Growth you can chart

    Count new customers per week or country with a pivot table.

  • Share outside Shopify

    Colleagues and partners can see customers without admin access.

  • No duplicates

    The newest creation time is stored, so each customer is copied once.

How it works

What happens, step by step

  1. Every 30 minutes ClickRuntime asks Shopify for customers created since the last check.

  2. For each customer it reads name, email, email marketing consent, country, order count and amount spent.

  3. Each customer becomes a row in your Customers tab, and the newest creation time is saved.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Shopify

What you get

RunsEvery 30 minutes
Copy new Shopify customers to Google Sheetstoday, 9:00Succeeded
Google Sheets · Store › Customers2026-11-10 | Sofia Lind | sofia.lind@mail.se | subscribed | Sweden | 1 order | 64.00 SEK

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and Shopify steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
copy_new_shopify_customers_to_google_sheets.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, report_fetched

STORE = "your-store.myshopify.com"
SHEET_ID = "your-spreadsheet-id"
QUERY = """query($q: String!) { customers(first: 100, query: $q, sortKey: CREATED_AT) { nodes {
  createdAt displayName defaultEmailAddress { emailAddress marketingState } defaultAddress { country }
  numberOfOrders amountSpent { amount currencyCode } } } }"""

def gql(query, variables=None):
    resp = http.post(f"https://{STORE}/admin/api/2025-07/graphql.json", json={"query": query, "variables": variables or {}},
                     headers={"X-Shopify-Access-Token": credentials.connection("shopify", "store")})
    resp.raise_for_status()
    return resp.json()["data"]

@on_trigger
def run(event):
    since = state.get("since") or "2026-01-01T00:00:00Z"
    customers = gql(QUERY, {"q": f"created_at:>'{since}'"})["customers"]["nodes"]
    report_fetched(len(customers))
    if not customers:
        return {"new": 0}
    rows = []
    for c in customers:
        email = c.get("defaultEmailAddress") or {}
        rows.append([c["createdAt"][:10], c["displayName"], email.get("emailAddress") or "",
                     (email.get("marketingState") or "").lower().replace("_", " "), (c.get("defaultAddress") or {}).get("country") or "",
                     int(c["numberOfOrders"]), c["amountSpent"]["amount"], c["amountSpent"]["currencyCode"]])
    build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False) \
        .spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Customers!A:H", valueInputOption="USER_ENTERED",
                                        body={"values": rows}).execute()
    state.set("since", max(c["createdAt"] for c in customers))
    return {"new": len(rows)}

FAQ

Common questions

Why include marketing consent?
If you use the sheet for email campaigns, you should only contact customers marked subscribed. Keeping the consent column next to each email makes that filter simple.
Are the order count and amount spent kept up to date?
They are recorded when the customer is copied, which is usually right after their first order. For current totals, ask your assistant for a nightly refresh of the whole tab.
Which Shopify access is needed?
A custom app with read_customers. Customer data access may also need approval for protected customer data in your app settings.
What permissions does it need?
read_customers; Google Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Copy new Shopify customers to Google Sheets” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.