Magento to Google Contacts, deduped leads ready
Your newest Magento customers are gold. But getting them out of Magento and into a usable outreach list usually turns into a tiny, daily mess: exports, filters, duplicates, and “wait, did we already email this person?”
This Magento contact dedupe automation hits ecommerce marketers first, honestly. Store owners feel it too, especially when they want a clean list for launches. And CRM admins get stuck cleaning up everyone else’s spreadsheet decisions.
This n8n workflow pulls new customers every 24 hours, deduplicates them using a Google Sheet, then creates fresh Google Contacts and logs the details. You’ll see how it works, what you need, and where teams usually trip up.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Magento to Google Contacts, deduped leads ready
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Create Google Contact", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Customers", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Log Synced Email", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/compare.svg' width='40' height='40' /></div><br/>Compare Datasets"]
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>GET PREVIOUS DATE"]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get New Customers"]
n6@{ icon: "mdi:database", form: "rounded", label: "Get Existing Emails", pos: "b", h: 48 }
n7@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n1 --> n3
n3 --> n0
n3 --> n2
n7 --> n6
n7 --> n4
n4 --> n5
n5 --> n1
n6 --> n3
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n7 trigger
class n2,n6 database
class n5 api
class n4 code
classDef customIcon fill:none,stroke:none
class n3,n4,n5 customIcon
The Problem: New Magento leads get messy fast
New customer registrations should be a simple input to your marketing and sales motion. In practice, they get trapped inside Magento until someone exports a CSV, cleans it up, and pastes it into “the sheet.” Then the next person does the same thing next week, from a slightly different date range, and now your list is polluted with duplicates. Worse, you don’t notice until Gmail bounces, or a VIP complains they got the “welcome” email twice. The work isn’t hard. It’s just constant, and it steals attention from campaigns that actually move revenue.
The friction compounds. Here’s where it breaks down.
- CSV exports and manual filtering usually take about 30 minutes a day when you include checking dates, deleting duplicates, and reformatting columns.
- Lists built by hand drift over time, so your “source of truth” becomes a debate instead of a file you trust.
- Duplicates create real brand damage, because sending the same outreach twice feels sloppy and automated in the worst way.
- Without a consistent log of what you’ve already synced, you end up reprocessing customers and wasting even more time “spot-checking.”
The Solution: Daily Magento → Google Contacts + Sheets, deduped
This workflow runs on a schedule (daily) and fetches customers who registered in Magento 2 within the last 24 hours using the Magento API. Before it creates anything, it pulls a list of already-synced emails from a Google Sheet that acts as your “do not reprocess” tracker. Each customer record is compared against that tracker, so only truly new emails move forward. For every unique customer, the workflow creates a Google Contact with key fields (first name, last name, email), then logs the customer details to Google Sheets, including group and store context like website_id and store_id. Finally, it appends the email to the tracking list so tomorrow’s run stays clean too.
The workflow starts with a daily schedule, then calculates the exact midnight-to-midnight date window for “new customers.” It fetches Magento registrations, splits them into individual records, compares each email to your existing sheet, and only then writes to Google Contacts and Google Sheets. No duplicate entries. No rework.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your store gets 20 new customer registrations a day. Manually, you export Magento, filter for “today,” dedupe against last week’s list, then import into Google Contacts and update your sheet, which is easily 5 minutes per customer once you include checking for repeats. That’s roughly 1.5 hours a day. With this workflow, your “time spent” is basically the first setup plus a quick glance at the sheet now and then, maybe 5 minutes a week. The rest runs while you sleep.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Magento 2 (Adobe Commerce) as the customer data source.
- Google Sheets to track synced emails and log customers.
- Google Contacts to store clean, deduped contacts.
- Magento 2 bearer token (create it in Magento Admin via Integrations or API tokens).
- Google API credentials (set up in Google Cloud console for Sheets/Contacts access).
Skill level: Intermediate. You’ll connect credentials, confirm your Magento API endpoint, and map a few fields in Google nodes.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A daily schedule kicks things off. The workflow runs once per day (many teams pick just after midnight) so you always capture the last day of registrations without thinking about it.
The workflow calculates the date window. A small “prior date” step builds the exact midnight-to-midnight range, then an HTTP request calls the Magento 2 API to fetch customers created in that window.
Each customer is checked for duplicates. n8n reads your existing “synced emails” list from Google Sheets, splits the Magento response into individual customers, then compares emails so only new ones go forward.
Contacts and logs are created in the right places. Unique customers get added to Google Contacts, and the workflow writes a row to Google Sheets with useful context (customer group, created_at, website_id, store_id) plus it updates the tracking sheet so tomorrow is clean.
You can easily modify the schedule time to match your timezone and reporting habits based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set the workflow’s schedule and kick off the parallel data retrieval paths.
- Add and open Scheduled Automation Trigger.
- Set your desired schedule in Scheduled Automation Trigger (for example, hourly or daily).
- Confirm that Scheduled Automation Trigger outputs to both Fetch Existing Emails and Fetch Prior Date in parallel.
Step 2: Connect Google Sheets
Fetch existing emails and record synced contacts using Google Sheets.
- Open Fetch Existing Emails and configure the spreadsheet and sheet to read the list of existing emails.
- Open Record Synced Emails and configure the destination spreadsheet and sheet to log synced contacts.
- Credential Required: Connect your Google Sheets credentials in both Fetch Existing Emails and Record Synced Emails.
Step 3: Set Up Processing Nodes
Prepare the date, pull new client data, split records, and compare against existing emails.
- Open Fetch Prior Date and configure the code logic to return the prior date used for filtering new clients.
- Open Retrieve New Clients and set the API endpoint and any required headers or parameters for your data source.
- Confirm the connection flow: Fetch Prior Date → Retrieve New Clients → Divide Customer Records → Compare Data Sets.
- In Compare Data Sets, configure the comparison logic between Fetch Existing Emails and the split new client data from Divide Customer Records.
Step 4: Configure Output/Action Nodes
Create new contacts and record synced emails from the comparison results.
- Open Generate Google Contact and map the fields needed to create a new contact from Compare Data Sets.
- Ensure Compare Data Sets routes matched output to both Generate Google Contact and Record Synced Emails.
- Credential Required: Connect your Google Contacts credentials in Generate Google Contact.
Step 5: Test and Activate Your Workflow
Validate the end-to-end sync and enable scheduled execution.
- Click Execute Workflow to run a manual test from Scheduled Automation Trigger.
- Verify that Fetch Existing Emails and Fetch Prior Date run in parallel, then confirm Retrieve New Clients, Divide Customer Records, and Compare Data Sets complete successfully.
- Confirm new contacts are created in Google Contacts via Generate Google Contact and logged in Sheets by Record Synced Emails.
- When the test succeeds, switch the workflow to Active to enable scheduled automation.
Common Gotchas
- Magento 2 credentials can expire or lack the right scope. If sync suddenly returns zero customers, check the bearer token and the API user permissions in Magento Admin first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Google Sheets can fail quietly when a tab name changes or columns move. If dedupe starts missing repeats, confirm the sheet ID, the worksheet/tab name, and that “email” is still where the comparison expects it.
Frequently Asked Questions
About 30–60 minutes if your Magento and Google credentials are ready.
No. You’ll mainly connect accounts and paste your Magento API details into the HTTP request step.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in any hosting cost if you self-host, plus Google/Magento API access on your side.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but keep the dedupe logic. Change the Scheduled Automation Trigger to weekly and adjust the date-window logic in the Fetch Prior Date step so it pulls the right range, then keep Compare Data Sets pointing at the same Google Sheets tracker.
Most of the time it’s an expired bearer token or a token created for a user without API permissions. Regenerate the token, update the credential in n8n, and confirm the Magento REST endpoint you’re calling matches your base URL. If it fails only on busy days, you might also be hitting rate limits, so adding small batching via the Divide Customer Records step can help.
For most small and mid-sized stores, it’s fine. n8n Cloud limits depend on plan executions per month, while self-hosting has no hard execution cap and mainly depends on your server. Practically, if you’re syncing a few hundred customers a day, this pattern (fetch, split, compare, write) is a good fit.
Often, yes, because dedupe with a “tracker sheet” plus branching logic is exactly where n8n stays predictable and affordable. Zapier and Make can do it, but you may end up paying more as tasks climb, and multi-step filtering can get awkward. n8n also gives you the HTTP request control you need for Magento without fighting connector limitations. If you want a fully managed setup with the least tinkering, Zapier might still be tempting. Talk to an automation expert if you want a quick recommendation for your stack.
Once this is running, new Magento customers quietly turn into clean Google Contacts and a reliable Google Sheet log. Set it up once, and you’ll stop thinking about exports altogether.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.