Intermediate~20 min setupMarketing & E-commerceVerified April 2026
Mailchimp logo
WooCommerce logo

How to Tag Inactive WooCommerce Customers in Mailchimp with N8n

Automatically add 'win-back' tags to Mailchimp contacts when WooCommerce customers haven't purchased in 90 days.

Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.

Best for

E-commerce stores that need custom win-back logic beyond simple 90-day rules and don't mind coding date calculations.

Not ideal for

Teams wanting plug-and-play win-back campaigns or those without JavaScript experience for customer filtering logic.

Sync type

scheduled

Use case type

sync

Real-World Example

💡

A 12-person outdoor gear retailer uses this to tag customers who haven't bought in 90 days, but excludes anyone who purchased seasonal items in winter (ski gear customers naturally have longer purchase cycles). Before automation, their marketing manager spent 3 hours weekly manually segmenting Mailchimp audiences by export-import from WooCommerce, and often missed the 90-day window by several weeks.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

Each platform counts differently — Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.

Prices shown for annual billing. Based on published pricing as of April 2026.

Estimated ROI

1000

min saved/mo

$583

labor value/mo

Free

no platform cost

Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.

Implementation

Skip the setup

Import this workflow directly into n8n

Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured — you just need to connect your accounts.

Before You Start

Make sure you have everything ready.

WooCommerce store with REST API enabled and consumer key/secret generated
Mailchimp account with API key and existing customer audience/list
N8n instance running (cloud or self-hosted) with account access
Mailchimp automation campaign set up to trigger on 'win-back' tag

Optional

Basic understanding of JavaScript for date calculations and array manipulation

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Customer Emailbilling.email
Order Datedate_completed
Order Statusstatus
3 optional fields▸ show
Customer First Namebilling.first_name
Order Totaltotal
Product Categoriesline_items.product_id

Step-by-Step Setup

1

Dashboard > New > Workflow

Create New Workflow

Start a fresh N8n workflow for the win-back campaign automation. This workflow will run daily to check purchase dates and tag inactive customers.

  1. 1Click the 'New' button in the N8n dashboard
  2. 2Select 'Workflow' from the dropdown menu
  3. 3Name it 'WooCommerce Win-back Tagging'
What you should see: You should see a blank canvas with a single 'Start' node in the center.
2

Nodes > Trigger > Schedule Trigger

Add Schedule Trigger

Set up a daily schedule to check for customers who need win-back tags. Daily checking ensures you catch customers right at the 90-day mark.

  1. 1Click the + icon next to the Start node
  2. 2Search for 'Schedule Trigger' in the node list
  3. 3Set Interval to 'Days' and Value to '1'
  4. 4Set Trigger Time to '09:00' for morning execution
What you should see: The Schedule Trigger node shows 'Runs every 1 day(s) at 09:00' in the node summary.
Common mistake — Don't use Interval mode 'Minutes' here — you'll hit WooCommerce API rate limits with frequent requests.
n8n
+
click +
search apps
Mailchimp
MA
Mailchimp
Add Schedule Trigger
Mailchimp
MA
module added
3

Nodes > Regular > WooCommerce

Connect WooCommerce Node

Add WooCommerce node to fetch all orders from the past 91 days. We need 91 days to identify customers whose last purchase was exactly 90 days ago.

  1. 1Click + after the Schedule Trigger node
  2. 2Search for 'WooCommerce' and select it
  3. 3Choose 'Order > Get All' operation
  4. 4Enter your WooCommerce API credentials (Consumer Key and Secret)
  5. 5Set 'After' parameter to {{ $now.minus({days: 91}).toISO() }}
What you should see: WooCommerce node shows 'Connected' status and displays your store URL in the node header.
Common mistake — Generate API credentials in WooCommerce > Settings > Advanced > REST API — don't use your WordPress login credentials.
4

Nodes > Regular > Code

Add JavaScript Filter Node

Filter customers whose last purchase was exactly 90 days ago. This code node will calculate purchase dates and identify win-back candidates.

  1. 1Click + after WooCommerce node
  2. 2Select 'Code > JavaScript'
  3. 3Paste the customer filtering code in the editor
  4. 4Set the node name to 'Filter 90-Day Inactive'
What you should see: JavaScript node shows green execution status and displays the count of filtered customers in the output preview.
Common mistake — Use .toISOString() for date comparisons — WooCommerce returns dates in ISO format, not timestamps.

Drop this into an n8n Code node.

JavaScript — Code Node// Filter orders to exactly 90 days ago and dedupe customers
▸ Show code
// Filter orders to exactly 90 days ago and dedupe customers
const targetDate = new Date();
targetDate.setDate(targetDate.getDate() - 90);

... expand to see full code

// Filter orders to exactly 90 days ago and dedupe customers
const targetDate = new Date();
targetDate.setDate(targetDate.getDate() - 90);
const targetDateStr = targetDate.toISOString().split('T')[0];

const uniqueCustomers = [];
const seenEmails = new Set();

for (const order of $input.all()) {
  const orderDate = order.json.date_completed.split('T')[0];
  if (orderDate === targetDateStr && order.json.status === 'completed') {
    const email = order.json.billing.email.toLowerCase();
    if (!seenEmails.has(email)) {
      seenEmails.add(email);
      uniqueCustomers.push({email: email, order_total: order.json.total});
    }
  }
}

return uniqueCustomers.map(customer => ({json: customer}));
Mailchimp
MA
trigger
filter
Condition
matches criteria?
yes — passes through
no — skipped
WooCommerce
WO
notified
5

Nodes > Regular > Code

Add Customer Email Extraction

Extract unique customer emails from the filtered orders. Multiple orders from the same customer should only generate one tag operation.

  1. 1Click + after the JavaScript node
  2. 2Add another 'JavaScript' node
  3. 3Name it 'Extract Unique Emails'
  4. 4Add code to deduplicate customer emails from order data
What you should see: Node output shows an array of unique email addresses without duplicates.
6

Nodes > Regular > Mailchimp

Connect Mailchimp Node

Add Mailchimp connection to find contacts by email address. We need to locate existing contacts before we can tag them.

  1. 1Click + after the email extraction node
  2. 2Search for 'Mailchimp' and select it
  3. 3Choose 'Member > Get' operation
  4. 4Enter your Mailchimp API key
  5. 5Set List ID to your main customer list
  6. 6Map Email field to {{ $json.email }}
What you should see: Mailchimp node shows 'Connected' and displays your account name in the credentials section.
Common mistake — Find your List ID in Mailchimp > Audience > Settings > Audience name and defaults — it's not the list name.
7

Node Settings > Settings > Continue on Fail

Add Error Handling for Missing Contacts

Handle cases where WooCommerce customers don't exist in Mailchimp. Some customers might have unsubscribed or been manually removed.

  1. 1Click the Mailchimp node settings (three dots)
  2. 2Go to 'Settings' tab
  3. 3Set 'Continue on Fail' to true
  4. 4Add an IF node after Mailchimp to check for successful responses
What you should see: Mailchimp node shows a shield icon indicating error handling is enabled.
Common mistake — Without Continue on Fail, one missing contact will stop the entire workflow and no tags will be applied.
8

Nodes > Regular > Mailchimp

Add Win-back Tag Application

Apply the 'win-back' tag to found Mailchimp contacts. This tag will trigger your existing Mailchimp automation sequence.

  1. 1Click + after the IF node (true branch)
  2. 2Add another Mailchimp node
  3. 3Choose 'Member > Update' operation
  4. 4Set List ID to the same list as before
  5. 5Map Email to {{ $json.email_address }}
  6. 6Add 'win-back' to the Tags array field
What you should see: Update node shows successful tag application with the contact's updated tag list in the output.
Common mistake — Use 'Update' not 'Create' operation — attempting to create existing members will cause API errors.
9

Nodes > Regular > HTTP Request

Add Success Logging

Log successful tag applications for monitoring and debugging. Track how many customers get tagged each day.

  1. 1Click + after the Mailchimp Update node
  2. 2Add 'HTTP Request' node pointing to a logging service
  3. 3Or add 'Webhook' node to send data to Google Sheets
  4. 4Include email, tag date, and success status in the log
What you should see: Logging node executes without errors and shows confirmation of data sent to your logging destination.
10

Workflow > Execute Workflow

Test with Sample Data

Execute the workflow manually with a small date range to verify tagging works correctly. Test prevents accidentally tagging your entire customer base.

  1. 1Change the WooCommerce date filter to last 7 days temporarily
  2. 2Click 'Execute Workflow' button
  3. 3Check N8n execution log for any errors
  4. 4Verify tags appeared in Mailchimp for test contacts
What you should see: Execution completes successfully and shows green checkmarks on all nodes with processed contact counts.
Common mistake — Test with a recent date range first — don't run 91 days of data on your first test or you might tag active customers.
n8n
▶ Run once
executed
Mailchimp
WooCommerce
WooCommerce
🔔 notification
received
11

Workflow > Active Toggle

Activate Scheduled Execution

Turn on the workflow to run automatically each morning. The schedule trigger will execute daily at your configured time.

  1. 1Click the 'Inactive' toggle in the top-right corner
  2. 2Confirm activation in the popup dialog
  3. 3Restore the 91-day date filter in WooCommerce node
  4. 4Save the workflow with Ctrl+S
What you should see: Workflow status changes to 'Active' with a green indicator, and you see 'Next execution' timestamp displayed.
Common mistake — Double-check your date filter is back to 91 days before activating — the test range will tag wrong customers.

Scaling Beyond 200+ orders per day+ Records

If your volume exceeds 200+ orders per day records, apply these adjustments.

1

Batch API Calls

Use N8n's SplitInBatches node to process customers in groups of 50. This prevents memory issues and makes error recovery easier when Mailchimp API calls fail.

2

Optimize Date Filtering

Add order status and customer type filters in the WooCommerce API call rather than JavaScript post-processing. Reduces data transfer and execution time significantly.

3

Cache Customer Lists

Store processed customer emails in N8n's built-in database to avoid re-tagging the same customers. Clear cache monthly to catch address changes.

Going live

Production Checklist

Before you turn this on for real, confirm each item.

Troubleshooting

Common errors and how to fix them.

Frequently Asked Questions

Common questions about this workflow.

Analysis

VerdictWhy n8n for this workflow

Use N8n for this if you want full control over the win-back logic and don't mind writing JavaScript for date calculations. N8n's code nodes let you build complex customer segmentation that Zapier can't handle — like excluding customers who purchased different product categories or factoring in return dates. The downside: you're building this from scratch instead of using a pre-built template. Go with Mailchimp's built-in automation features if you just need basic 90-day win-back without custom logic.

Cost

This workflow uses roughly 15 executions per run — 1 for the schedule trigger, 3-8 for WooCommerce API calls (depending on order volume), 2-6 for customer processing, and 3-5 for Mailchimp updates. At 30 runs per month, that's 450 executions total. N8n's Starter plan at $20/month includes 2,500 executions, so you're well under the limit. Zapier would cost $20/month for the same workflow, but Make could handle it for $9/month with their operations-based pricing.

Tradeoffs

Make wins on the template front — they have a pre-built WooCommerce to Mailchimp win-back scenario that takes 10 minutes to set up versus N8n's 45-60 minute custom build. Zapier's strength is reliability — their WooCommerce integration handles API pagination automatically, while you'll code that yourself in N8n. But N8n gives you surgical control over customer selection criteria that neither platform matches. You can exclude refunded orders, weight recent purchases differently, or factor in customer lifetime value.

WooCommerce's order API paginates at 100 records per request, so stores with 500+ orders in 91 days need loop handling in your JavaScript nodes. Mailchimp's member lookup is case-sensitive on email addresses — WooCommerce might store '[email protected]' while Mailchimp has '[email protected]', causing lookup failures. The biggest gotcha: WooCommerce includes draft, pending, and cancelled orders in date range queries by default. Filter for 'completed' status only, or you'll tag customers who never actually purchased anything.

Ideas for what to build next

  • Add High-Value Customer SegmentationCreate a separate workflow that applies 'vip-winback' tags to customers whose last order exceeded $500, triggering different email campaigns with larger discounts.
  • Track Win-back Campaign SuccessBuild a follow-up automation that removes win-back tags when customers make new purchases and logs conversion rates to Google Sheets for ROI analysis.
  • Implement Progressive Win-back StagesExpand to multi-stage tagging (30-day, 60-day, 90-day inactive) with escalating offers and different email sequences for each stage.

Related guides

Was this guide helpful?
Mailchimp + WooCommerce overviewn8n profile →