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

How to Tag Customers by Purchase with Pipedream

Tags new customers in Mailchimp based on their WooCommerce purchase, triggering product-specific email sequences.

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

Best for

WooCommerce stores that need instant customer tagging based on product purchases to trigger targeted email campaigns

Not ideal for

Simple one-size-fits-all email sequences where product-specific tagging isn't needed

Sync type

real-time

Use case type

notification

Real-World Example

πŸ’‘

A clothing store with 200 orders/month uses this to tag customers by purchase category (shoes, shirts, accessories) in Mailchimp within 30 seconds of checkout. Before automation, they manually tagged customers twice weekly, missing 40% of new purchases and sending generic follow-ups instead of product-specific care instructions and upsells.

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 Pipedream

Copy the pre-built Pipedream blueprint and paste it straight into Pipedream. 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 REST API enabled with Consumer Key and Secret generated
Mailchimp account with at least one audience list created
Admin access to WooCommerce store settings for webhook configuration
Email automation sequences already set up in Mailchimp with tag-based triggers

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Customer Emailemail_address
Product Tagstags
Subscription Statusstatus
4 optional fieldsβ–Έ show
First Namemerge_fields.FNAME
Last Namemerge_fields.LNAME
Order Totalmerge_fields.ORDER_TOTAL
Purchase Datemerge_fields.LAST_PURCHASE

Step-by-Step Setup

1

Dashboard > New > Start from scratch

Create new Pipedream workflow

Go to pipedream.com and click New in the top navigation. Select 'Start from scratch' to build a custom workflow. This gives you full control over the trigger configuration and data processing steps needed for order-based tagging.

  1. 1Click 'New' in the top navigation bar
  2. 2Select 'Start from scratch' from the template options
  3. 3Name your workflow 'WooCommerce to Mailchimp Tagging'
βœ“ What you should see: You should see a blank workflow canvas with 'Add your first step' button visible.
2

Workflow Canvas > Add your first step > WooCommerce

Add WooCommerce webhook trigger

Click 'Add your first step' and search for WooCommerce. Select the 'Order Created' webhook trigger to capture new orders instantly. This webhook fires within 5 seconds of checkout completion, giving you real-time access to purchase data.

  1. 1Click 'Add your first step'
  2. 2Search for and select 'WooCommerce'
  3. 3Choose 'Order Created (Instant)' from the trigger list
  4. 4Connect your WooCommerce store using the API key
βœ“ What you should see: You'll see a webhook URL generated and the WooCommerce connection status showing as 'Connected'.
⚠
Common mistake β€” The webhook requires WooCommerce REST API to be enabled in your store settings under WooCommerce > Settings > Advanced > REST API.
Pipedream
+
click +
search apps
Mailchimp
MA
Mailchimp
Add WooCommerce webhook trig…
Mailchimp
MA
module added
3

WooCommerce Admin > Settings > Advanced > Webhooks

Configure WooCommerce webhook in your store

Copy the webhook URL from Pipedream and add it to your WooCommerce webhooks. Go to WooCommerce > Settings > Advanced > Webhooks and create a new webhook for 'Order created' events. This connects your store to the Pipedream trigger.

  1. 1Copy the webhook URL from your Pipedream trigger
  2. 2In WooCommerce admin, go to Settings > Advanced > Webhooks
  3. 3Click 'Add webhook'
  4. 4Set Topic to 'Order created' and paste the webhook URL
βœ“ What you should see: The webhook should show 'Active' status and you'll see a green checkmark in WooCommerce.
⚠
Common mistake β€” Set the webhook to deliver JSON payload - XML format will break the Pipedream parsing.
4

Pipedream Workflow > Test Section

Test the webhook connection

Place a test order in your WooCommerce store to verify the webhook fires correctly. You should see order data appear in Pipedream within 10 seconds. Check that line items, customer email, and product categories are captured properly.

  1. 1Go to your store and add a product to cart
  2. 2Complete checkout with a test email address
  3. 3Return to Pipedream and check the 'Test' section
  4. 4Verify order data appears with customer and product details
βœ“ What you should see: You should see JSON order data including customer email, line items, and product details in the test panel.
⚠
Common mistake β€” Use a real payment method or enable test mode - orders marked as 'pending payment' won't trigger the webhook.
Pipedream
β–Ά Deploy & test
executed
βœ“
Mailchimp
βœ“
WooCommerce
WooCommerce
πŸ”” notification
received
5

Workflow Canvas > + > Code

Add code step for tag logic

Click the + button below your trigger and select 'Code'. This Node.js step will analyze the order data and determine which tags to apply based on purchased products. You'll map product categories or specific items to Mailchimp tags.

  1. 1Click the + button below the WooCommerce trigger
  2. 2Select 'Code' from the step options
  3. 3Choose 'Run Node.js code'
  4. 4Name the step 'Generate Tags from Order'
βœ“ What you should see: You'll see a code editor with a basic async function template ready for customization.
⚠
Common mistake β€” Don't modify the function signature - Pipedream expects async (event, steps) format.

This Node.js code analyzes the WooCommerce order data and creates smart tags based on product categories, order value, and customer history. Paste it into your 'Generate Tags from Order' code step.

JavaScript β€” Code Stepasync (event, steps) => {
β–Έ Show code
async (event, steps) => {
  const order = steps.trigger.event
  const tags = []

... expand to see full code

async (event, steps) => {
  const order = steps.trigger.event
  const tags = []
  
  // Tag by product categories
  if (order.line_items && order.line_items.length > 0) {
    order.line_items.forEach(item => {
      if (item.categories) {
        item.categories.forEach(cat => {
          tags.push(`purchased-${cat.slug}`)
        })
      }
      
      // Tag specific high-value products
      if (parseFloat(item.price) > 100) {
        tags.push('high-value-item')
      }
    })
  }
  
  // Tag by order value
  const total = parseFloat(order.total)
  if (total > 200) {
    tags.push('vip-customer')
  } else if (total > 100) {
    tags.push('high-value-customer')
  } else {
    tags.push('standard-customer')
  }
  
  // Tag new vs returning customers
  if (order.customer_id === 0) {
    tags.push('new-customer')
  } else {
    tags.push('returning-customer')
  }
  
  // Remove duplicates and return
  const uniqueTags = [...new Set(tags)]
  
  return { tags: uniqueTags }
}
6

Workflow Canvas > + > Mailchimp

Add Mailchimp step

Click + again and search for Mailchimp. Select 'Add or Update List Member' action to either create new contacts or update existing ones with tags. This handles both new customers and returning buyers automatically.

  1. 1Click + to add another step
  2. 2Search for and select 'Mailchimp'
  3. 3Choose 'Add or Update List Member'
  4. 4Connect your Mailchimp account via OAuth
βœ“ What you should see: Mailchimp connection shows 'Connected' and you can select your audience list from the dropdown.
⚠
Common mistake β€” Select 'subscribed' status only for customers who opted into marketing during checkout to avoid compliance issues.
7

Mailchimp Step > Configuration

Map customer data fields

Configure the Mailchimp step to pull customer email from the WooCommerce order data. Map billing name to first/last name fields and set the subscription status based on marketing preferences. Use the data from your webhook test to verify field paths.

  1. 1Set Email Address to steps.trigger.event.billing.email
  2. 2Map First Name to steps.trigger.event.billing.first_name
  3. 3Map Last Name to steps.trigger.event.billing.last_name
  4. 4Set Status to 'subscribed' or reference marketing consent field
βœ“ What you should see: Field mappings show green checkmarks and preview data from your test order.
⚠
Common mistake β€” Double-check email field path - some WooCommerce setups use customer.email instead of billing.email.
Mailchimp fields
email_address
status
merge_fields.FNAME
merge_fields.LNAME
tags[0].name
available as variables:
1.props.email_address
1.props.status
1.props.merge_fields.FNAME
1.props.merge_fields.LNAME
1.props.tags[0].name
8

Mailchimp Step > Tags Field

Configure dynamic tagging

In the Tags field of the Mailchimp step, reference the tags array created by your code step. Use steps.generate_tags_from_order.tags to pull the computed tags based on purchased products. This ensures each customer gets product-specific tags automatically.

  1. 1Scroll to the Tags section in Mailchimp configuration
  2. 2Click the reference data button (looks like {})
  3. 3Select steps > generate_tags_from_order > tags
  4. 4Verify the reference shows as steps.generate_tags_from_order.tags
βœ“ What you should see: The Tags field displays the dynamic reference and shows sample tags from your test data.
⚠
Common mistake β€” Tags must exist in Mailchimp or be created on-the-fly - check your audience tag settings if contacts aren't getting tagged.
9

Workflow Canvas > Deploy > Test

Test complete workflow

Deploy your workflow and place another test order to verify the complete flow works. Check that the customer appears in Mailchimp with correct tags within 60 seconds of checkout. Verify that email sequences trigger based on the applied tags.

  1. 1Click 'Deploy' in the top right corner
  2. 2Place a test order with different products
  3. 3Check Mailchimp audience for the new contact
  4. 4Verify correct tags are applied and sequences trigger
βœ“ What you should see: Customer appears in Mailchimp with product-specific tags and automation sequences begin sending.

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 Pipedream for this if you need instant webhook processing and custom tagging logic that goes beyond simple field mapping. The Node.js code steps let you analyze product data, calculate customer lifetime value, and create complex tag combinations that Zapier's built-in tools can't handle. Skip Pipedream if you're doing basic one-tag-per-order setups where Make's visual interface is faster to configure.

Cost

This workflow costs nothing until you hit 10,000 invocations per month on Pipedream's free tier. At 500 orders monthly, you're looking at free processing since each order triggers just one workflow run. Zapier would cost $20/month at that volume, and Make charges $9/month. Pipedream wins on cost until you reach serious e-commerce volume.

Tradeoffs

Make handles WooCommerce webhooks more reliably - their error handling retries failed webhook deliveries automatically while Pipedream requires manual retry configuration. Zapier has better Mailchimp integration with built-in duplicate prevention that Pipedream lacks. n8n offers similar Node.js flexibility but you'll host it yourself. Power Automate doesn't connect to WooCommerce webhooks without premium connectors. But Pipedream's instant processing and unlimited webhook endpoints make it ideal for real-time customer tagging where timing matters for email sequences.

You'll hit WooCommerce webhook inconsistencies first - some themes and plugins change the order data structure, breaking your field mappings without warning. Mailchimp's tag limits catch people off guard: 1,000 tags maximum per audience and 255 characters per tag name. Test orders don't always fire webhooks the same way as real purchases, especially with payment gateway plugins that modify the checkout flow. Plan for data validation in your code steps.

Ideas for what to build next

  • β†’
    Add purchase history enrichment β€” Extend the code step to track total lifetime value and purchase frequency for advanced customer segmentation.
  • β†’
    Create abandoned cart recovery β€” Set up a second workflow triggered by cart abandonment to tag prospects and send recovery sequences.
  • β†’
    Build order status updates β€” Add shipping and delivery confirmation emails by triggering on WooCommerce order status changes beyond just creation.

Related guides

Was this guide helpful?
← Mailchimp + WooCommerce overviewPipedream profile β†’