tr Skip to content
E-commerce & Orders

Create dynamic coupon in WooCommerce based on total order amount and send to user

Want to increase your sales through WooCommerce? Try this method. Generate a discount coupon based on the total order amount, send it to your user via email and WhatsApp notification. Your users will get flat discount on their next order and a reason to come back 🙂 This workflow will help you get started with capturing your orders and create a coupon code. For more information about this workflow, checkout the video – 

WooCommerceWooCommerce Maths ModuleMaths Module PHP Functions by FlowMatticPHP Functions by FlowMattic Email SmtpEmail Smtp
48 downloads ~8 min setup used by 1.9k 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 → Maths Module → PHP Functions by FlowMattic
5 steps
WooCommerce
TRIGGER
WooCommerce · New Product Created
The workflow starts automatically when a new product is created in WooCommerce. FlowMattic captures that data for the steps below.
Maths Module
ACTION
Maths Module · action
Maths Module runs its "action" action using data mapped from earlier steps. Connect your Maths Module account on import and it's live.
PHP Functions by FlowMattic
ACTION
PHP Functions by FlowMattic · Call PHP Function
PHP Functions by FlowMattic — call any PHP function and pass data from your workflow. Data is mapped from earlier steps; connect your PHP Functions by FlowMattic account on import.
WooCommerce
ACTION
WooCommerce · Create New Product
WooCommerce — create a new product in WooCommerce. Data is mapped from earlier steps; connect your WooCommerce account on import.
Email Smtp
ACTION
Email Smtp · action
Email Smtp runs its "action" action using data mapped from earlier steps. Connect your Email Smtp account on import and it's live.
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.