Skip to content
E-Commerce

When a new order received in WooCommerce, search array for product id using PHP Array, check the response using Filters, and send an email to user with a discount Coupon for next order

On each WooCommerce order, FlowMattic searches the line items for a specific product, filters the result, and emails matching buyers a discount coupon, driving repeat purchases automatically.

WooCommerceWooCommerce PHP Array by FlowMatticPHP Array by FlowMattic FilterFilter EmailEmail
~8 min setup used by 3.1k sites

Free · import into FlowMattic in one click

How it works

Every step, explained

Import the template and this whole chain runs on autopilot — here's exactly what happens on each run.

WooCommerce → PHP Array by FlowMattic → Filter
4 steps
WooCommerce
TRIGGER
WooCommerce · New Order Created
The workflow starts automatically when a new order is created in WooCommerce. FlowMattic captures that data for the steps below.
PHP Array by FlowMattic
ACTION
PHP Array by FlowMattic · Array Search
PHP Array by FlowMattic — searches an array for a given value and returns the key. Data is mapped from earlier steps; connect your PHP Array by FlowMattic account on import.
Filter
LOGIC
Filter · Continue If Condition Meet
The Filter only lets the run continue when its conditions are met.
Email
ACTION
Email · Send Email
Email — send an email using built-in WP mail function or custom SMTP. Data is mapped from earlier steps; connect your Email account on import.
Why this workflow

Built to own, not to rent

No-code setup

Import the JSON, connect your accounts, and go live in minutes. Every step is pre-mapped — you only add your own credentials.

Runs on your server

Self-hosted on your WordPress install. No per-task fees, no data leaving your infrastructure, no monthly SaaS bill.

Fully customizable

Open it in the visual builder and reshape it — add branches, swap apps, insert filters. A starting point, not a cage.

Ready to automate your WordPress site?

Download this workflow free, or grab FlowMattic and own every automation on your site — no per-task fees, ever.