Send automated discount vouchers to high-value Magento 2 customers with Gmail
Needs changesWhat this workflow does
This workflow has 11 nodes and runs on a schedule (legacy Cron node). Along the way it connects Gmail.
How it runs
Trigger: On a schedule (legacy Cron node).
- Get Media Path (HTTP Request): calls an HTTP API
- SetOrGet Logo (Code): runs custom JavaScript code
- Get 3 Month Dates (Code): runs custom JavaScript code
- Get Completed Orders (HTTP Request): calls an HTTP API
- Get Customer Order Value (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Create New Sales Rule (HTTP Request): calls an HTTP API
- Send Report (Gmail): uses Gmail
- Generate Coupon for Each Customer (HTTP Request): calls an HTTP API
- Send Voucher (Gmail): uses Gmail
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Cron: replace with Schedule Trigger.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Cron Cron | Schedule Trigger |
Nodes used (5)
- Cron
n8n-nodes-base.cron - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail
From the author
This workflow analyses completed orders from the past 3 months to identify high-value customers, generates unique voucher codes for each, and sends them a professionally designed promotional email. This n8n template helps Magento 2 merchants automatically…