This workflow corresponds to n8n.io template #6982 — we link there as the canonical source.
This workflow follows the Gmail → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a0292746-e1af-48ef-8c3e-2b315d9bc3c2",
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
-2180,
-120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d21a21ce-4e3d-429c-8eb2-767bf798a35d",
"name": "Get Completed Orders",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1300,
-120
],
"parameters": {},
"typeVersion": 2
},
{
"id": "f295afc4-fb07-43ab-ad05-514dac34b1e8",
"name": "Create New Sales Rule",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-640,
-220
],
"parameters": {},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "a67ca1ec-85b3-42cd-b66f-26cf92f2d700",
"name": "Generate Coupon for Each Customer",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-420,
-220
],
"parameters": {},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "dc219703-3d7d-4746-81dd-d5b06baf2dff",
"name": "Get Customer Order Value",
"type": "n8n-nodes-base.code",
"position": [
-1080,
-120
],
"parameters": {},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "2bf70bfd-f199-40ee-8b54-a89d51a89575",
"name": "Get 3 Month Dates",
"type": "n8n-nodes-base.code",
"position": [
-1520,
-120
],
"parameters": {},
"typeVersion": 2
},
{
"id": "def79c1c-5539-4b53-9c87-05c70f040d30",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-860,
-120
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "9f4571bc-0481-4c0a-b5b5-9944198a6ade",
"name": "Get Media Path",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1960,
-120
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "7c293a01-e30e-4787-bab9-ad8c0a63cbfd",
"name": "SetOrGet Logo",
"type": "n8n-nodes-base.code",
"position": [
-1740,
-120
],
"parameters": {},
"typeVersion": 2
},
{
"id": "81cf4124-2c8b-4ac9-86b0-e5447ced2889",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2230,
-300
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5573f544-0270-4150-9fdb-52baafa802c9",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1350,
-300
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "32229245-ce6c-4aab-81fe-5441e0eb2879",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-690,
-300
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "1d1e29f7-14cd-4361-8506-d6715e9f01b4",
"name": "Send Voucher",
"type": "n8n-nodes-base.gmail",
"position": [
-200,
-220
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "5da9da7f-07de-4419-b830-4b338ffadd28",
"name": "Send Report",
"type": "n8n-nodes-base.gmail",
"position": [
-640,
-20
],
"parameters": {},
"typeVersion": 2.1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "Create New Sales Rule",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Report",
"type": "main",
"index": 0
}
]
]
},
"Cron": {
"main": [
[
{
"node": "Get Media Path",
"type": "main",
"index": 0
}
]
]
},
"SetOrGet Logo": {
"main": [
[
{
"node": "Get 3 Month Dates",
"type": "main",
"index": 0
}
]
]
},
"Get Media Path": {
"main": [
[
{
"node": "SetOrGet Logo",
"type": "main",
"index": 0
}
]
]
},
"Get 3 Month Dates": {
"main": [
[
{
"node": "Get Completed Orders",
"type": "main",
"index": 0
}
]
]
},
"Get Completed Orders": {
"main": [
[
{
"node": "Get Customer Order Value",
"type": "main",
"index": 0
}
]
]
},
"Create New Sales Rule": {
"main": [
[
{
"node": "Generate Coupon for Each Customer",
"type": "main",
"index": 0
}
]
]
},
"Get Customer Order Value": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Generate Coupon for Each Customer": {
"main": [
[
{
"node": "Send Voucher",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n template helps Magento 2 merchants automatically send customised, beautifully branded coupon emails to high-value customers.
Source: https://n8n.io/workflows/6982/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Template 14310. Uses httpRequest, stopAndError, slack, gmail. Scheduled trigger; 53 nodes.
This automation includes order analysis, product comparison, management approval, and automated product deactivation, with full reporting and transparency. 1st of Every Month at 8 AM, it triggers a sc
BSW Growth Agent · Lite (Free Tier). Uses googleSheets, googleDrive, httpRequest, gmail. Scheduled trigger; 21 nodes.
Founder's Discovery Engine. Uses googleSheets, googleDrive, httpRequest, gmail. Scheduled trigger; 21 nodes.
It identifies SKUs with low inventory per source and sends daily alerts via: