Describe the problem/error/question
When I try to solve part 3 of workflow 2 on course level 2 by using the “Execute Workflow” command, my discord nodes send duplicate messages to the server. My unique ID is e5055c264b83b3e717ffc93cd6f8825a
You can see that I ran an execution on 9/4/2025 at 12:34 pacific time and there were 12 messages posted about the csv files and two messages about the gmail outputs. Only the discord nodes are being duplicated. I am not getting duplicate gmail messages. You can see that I tried setting the discord nodes to “Options → Wait” and “Settings → Execute Once” but that didn’t help. The error occurs with or without these changes.
See also this error: Cannot read properties of undefined (reading 'error') In Level 2 course. Discord Node - #2 by mohamed3nan which is why I cannot connect the discord node to Convert To File and instead I must connect it to an edit fields node which extracts the filename.
See also this topic which might be similar because its about duplicate output: Duplication Execution Issue: 181 Items Requested, 542 Executions Triggered with Execute Workflow (Queue Mode) - #5 by EtienneDouillard
What is the error message (if any)?
No error message, just duplicate output
Please share your workflow
For security I removed my
discordWebhookApi id
my gmailOAuth2 id
my email under sendTo in the gmail node
my airtableTokenApi id
my airtable cachedResultUrl values
{
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-576,
-16
],
"id": "28645197-8df9-4167-9db0-b1df5eaa85ad",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"url": "https://internal.users.n8n.cloud/webhook/level2-erp",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "unique_id",
"value": "e5055c264b83b3e717ffc93cd6f8825a"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-304,
-112
],
"id": "6f5c307e-4b02-4ddf-b600-d4d6f1d76fc9",
"name": "HTTP Request",
"credentials": {
"httpHeaderAuth": {
"id": "WaEim05RdY0YsACg",
"name": "Course2HeaderAuth"
}
}
},
{
"parameters": {
"operation": "search",
"base": {
"__rl": true,
"value": "app60Qdj2tdQJrTtM",
"mode": "list",
"cachedResultName": "Beginner Course",
"cachedResultUrl": ""
},
"table": {
"__rl": true,
"value": "tbl02peOTr2TGwpbQ",
"mode": "list",
"cachedResultName": "Imported table",
"cachedResultUrl": ""
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
-304,
112
],
"id": "f45bbe44-c9f1-47e2-a622-77d9efbd9880",
"name": "Search records",
"credentials": {
"airtableTokenApi": {
"id": "",
"name": "Airtable Personal Access Token account"
}
}
},
{
"parameters": {
"mode": "combine",
"fieldsToMatchString": "customerID",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
-128,
-16
],
"id": "9edf9b98-7cc6-435a-acbf-5d2e03cc9541",
"name": "Merge"
},
{
"parameters": {
"sortFieldsUi": {
"sortField": [
{
"fieldName": "orderPrice",
"order": "descending"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.sort",
"typeVersion": 1,
"position": [
80,
-16
],
"id": "486f00d5-4fc4-419f-bb0d-0264f10e719f",
"name": "Sort"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "48b613d6-f3e9-4897-994a-b7749645c028",
"leftValue": "={{ $json.region }}",
"rightValue": "Americas",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
272,
-160
],
"id": "70699dd6-c5fb-43c6-9b23-a7a82b1e281f",
"name": "If"
},
{
"parameters": {
"binaryPropertyName": "=data",
"options": {
"fileName": "={{ $json.orderID }}_n8n_c2_w2.csv"
}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
480,
-384
],
"id": "2d6d02cf-463e-474c-bd21-ffeed5cda376",
"name": "Convert to File1"
},
{
"parameters": {
"sendTo": "",
"subject": "=Sending file from n8n workflow",
"message": "See attachment for file.",
"options": {
"attachmentsUi": {
"attachmentsBinary": [
{}
]
}
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
672,
-384
],
"id": "2cc17b5a-4674-4443-9fc8-c96eeca07b3a",
"name": "Send a message",
"webhookId": "9adfb175-ee86-4a4b-aa1a-29e24d20c4d6",
"credentials": {
"gmailOAuth2": {
"id": "",
"name": "Gmail account 2"
}
}
},
{
"parameters": {
"authentication": "webhook",
"content": "=I sent the file using email with the label ID {{ $json.id }}. My ID: e5055c264b83b3e717ffc93cd6f8825a",
"options": {
"wait": true
}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
880,
-384
],
"id": "65360e04-5073-4a67-a324-70c2b263ebff",
"name": "Discord",
"webhookId": "e0973225-d097-47d9-aaf9-f39fd2c73d34",
"executeOnce": true,
"credentials": {
"discordWebhookApi": {
"id": "",
"name": "Discord Webhook account"
}
}
},
{
"parameters": {
"batchSize": 5,
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
464,
-16
],
"id": "eb5f7246-a592-49f9-be98-c5ad056f22fe",
"name": "Loop Over Items"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "0211039f-24bd-47e7-a45e-0871f1e44bed",
"name": "customerEmail",
"value": "={{ $json.customerEmail }}",
"type": "string"
},
{
"id": "d927a794-663a-40b7-915a-733b3d4fb23c",
"name": "customerRegion",
"value": "={{ $json.region }}",
"type": "string"
},
{
"id": "0690f472-d2bb-4b59-a850-a01fe15ec4a5",
"name": "customerSince",
"value": "={{ $json.customerSince }}",
"type": "string"
},
{
"id": "e9380488-a4f6-4b63-ae35-d877d5ca81f0",
"name": "orderPrice",
"value": "={{ $json.orderPrice }}",
"type": "number"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
784,
0
],
"id": "490c747d-ee4a-4ae3-b92d-f3842aa5e8e3",
"name": "Edit Fields"
},
{
"parameters": {
"operation": "formatDate",
"date": "={{ $json.customerSince }}",
"options": {
"includeInputFields": true
}
},
"type": "n8n-nodes-base.dateTime",
"typeVersion": 2,
"position": [
992,
0
],
"id": "d65e8731-97e8-4c65-9554-0d472c6a6a33",
"name": "Date & Time"
},
{
"parameters": {
"binaryPropertyName": "=data",
"options": {
"fileName": "={{ $runIndex > 0 ? 'file_low_orders':'file_high_orders' }}"
}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
1408,
0
],
"id": "6e32ecaa-c016-485e-be34-f1b79e4e7273",
"name": "Convert to File"
},
{
"parameters": {
"authentication": "webhook",
"content": "=I created the spreadsheet {{ $json.fileName }}. My ID: e5055c264b83b3e717ffc93cd6f8825a",
"options": {
"wait": true
}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
1440,
208
],
"id": "a5cfb275-d0c3-4e1c-9b32-15ded38993cf",
"name": "Discord1",
"webhookId": "c16df417-e289-43b0-855b-02e754bec265",
"executeOnce": true,
"credentials": {
"discordWebhookApi": {
"id": "",
"name": "Discord Webhook account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "9b578023-d5d9-45a6-b1e8-8da4f33dcec0",
"name": "fileName",
"value": "={{ $runIndex > 0 ? 'file_low_orders':'file_high_orders' }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1200,
0
],
"id": "6ede590e-329a-49aa-9316-3f41dee71bee",
"name": "Edit Fields1",
"executeOnce": true
}
],
"connections": {
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
},
{
"node": "Search records",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Search records": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Sort",
"type": "main",
"index": 0
}
]
]
},
"Sort": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
},
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Convert to File1",
"type": "main",
"index": 0
}
],
[]
]
},
"Convert to File1": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Send a message": {
"main": [
[
{
"node": "Discord",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Date & Time",
"type": "main",
"index": 0
}
]
]
},
"Date & Time": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
},
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[]
]
},
"Discord1": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Discord1",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "532cdf91f1df2dc520dd203b5dee3569d915bb1b92402c086df30d5e706119f1"
}
}
Share the output returned by the last node
See the discord server in the channel course-level-2, at time 12:34 pm Pacific time on 9/4/2025
Information on your n8n setup
- n8n version: 1.109.1
- Database (default: SQLite): sqlite
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: Windows 10 Home