I am following n8n Course Level 2 – Part 2: Generating file for regional sales.
My workflow works correctly until the Discord node. The Gmail node successfully sends the files as attachments, but the Discord node fails when sending the required message to the course Discord channel.
Describe the problem/error/question
What is the error message (if any)?
Your message was invalid. Please make sure you are sending the exact text requested.
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to {
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-144,
0
],
"id": "551fd491-c4e5-41cf-89eb-077737c5fcc0",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"url": "https://learn.app.n8n.cloud/webhook/level2-erp",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "unique_id",
"value": "a459cf3eb3ca1129ba1d8a00ef41c62a"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
80,
-144
],
"id": "4b9acabd-898f-4fed-a088-59305580f91c",
"name": "HTTP Request",
"credentials": {
"httpHeaderAuth": {
"id": "O42cLWXCP3eUZvoX",
"name": "Header Auth account 3"
}
}
},
{
"parameters": {
"operation": "search",
"base": {
"__rl": true,
"value": "app6g4pXmePmk9Hic",
"mode": "list",
"cachedResultName": "Workflow 1: Merging data",
"cachedResultUrl": "https://airtable.com/app6g4pXmePmk9Hic"
},
"table": {
"__rl": true,
"value": "tblbWahS5RuiRibFy",
"mode": "list",
"cachedResultName": "customers",
"cachedResultUrl": "https://airtable.com/app6g4pXmePmk9Hic/tblbWahS5RuiRibFy"
},
"options": {}
},
"type": "n8n-nodes-base.airtable",
"typeVersion": 2.1,
"position": [
80,
144
],
"id": "70a673d8-28c7-4bcf-abf5-df3e44345d7b",
"name": "Search records",
"credentials": {
"airtableTokenApi": {
"id": "ojEr5NMgNWvddBgk",
"name": "Airtable Personal Access Token account"
}
}
},
{
"parameters": {
"mode": "combine",
"fieldsToMatchString": "customerID",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
320,
-16
],
"id": "bd9b67b2-e0cc-45e4-b4a3-ce98d8eb653b",
"name": "Merge"
},
{
"parameters": {
"sortFieldsUi": {
"sortField": [
{
"fieldName": "orderPrice",
"order": "descending"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.sort",
"typeVersion": 1,
"position": [
528,
-16
],
"id": "4e956707-86bc-450a-a494-30cf0088aa33",
"name": "Sort"
},
{
"parameters": {
"content": "Part 1: Getting data from different sources\n",
"height": 528,
"width": 864,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-192,
-192
],
"id": "a3810ee4-2f5a-4ffa-a884-af91baaff860",
"name": "Sticky Note"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "11eb86f3-41d6-4c49-acea-9ffcfd1d7ce9",
"leftValue": "={{$json.region}}",
"rightValue": "Americas",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
832,
-144
],
"id": "82e33672-316c-4687-8b0f-12dcc1eed89a",
"name": "If"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
928,
288
],
"id": "7188e94a-ff1d-4cf7-b3b8-1843e2400681",
"name": "Loop Over Items"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"name": "Replace Me",
"typeVersion": 1,
"position": [
1408,
288
],
"id": "1d9e4342-a546-42d0-b3de-7c06ffd5e170"
},
{
"parameters": {
"operation": "toJson",
"mode": "each",
"options": {
"fileName": "=order_{{$json.orderID}}.json\n"
}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
1104,
-160
],
"id": "0f8ad842-4757-4e1a-af6b-e010b45ca8cf",
"name": "Convert to File"
},
{
"parameters": {
"authentication": "webhook",
"content": "=I sent the file using email with the label ID{{$json.labelIds}}. My ID:a459cf3eb3ca1129ba1d8a00ef41c62a\n\n",
"options": {}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
1520,
-160
],
"id": "2030c6de-d9e9-4bc0-9167-ac3fd0c4cd7f",
"name": "Discord",
"webhookId": "ba96190f-3e8d-49d9-9a2e-56515a42abe7",
"credentials": {
"discordWebhookApi": {
"id": "AUKWj6P9FfOVokmy",
"name": "Discord Webhook account"
}
}
},
{
"parameters": {
"sendTo": "[email protected]",
"subject": "n8n level 2 test",
"message": "sending files",
"options": {
"attachmentsUi": {
"attachmentsBinary": [
{}
]
}
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
1312,
-160
],
"id": "11cf659b-1f21-4841-8998-a97029ff5580",
"name": "Send a message",
"webhookId": "50b192b9-9c71-463e-beaf-2158c43949d5",
"credentials": {
"gmailOAuth2": {
"id": "cWSBHCpd06NLBr5x",
"name": "Gmail account"
}
}
}
],
"connections": {
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Search records",
"type": "main",
"index": 0
},
{
"node": "HTTP Request",
"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 File",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Replace Me",
"type": "main",
"index": 0
}
]
]
},
"Replace Me": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Send a message": {
"main": [
[
{
"node": "Discord",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "462bc48ca59b21e7a035149841911b6deb17aefb21ba1e7d8684d47f13eccbdb"
}
}copy and paste the workflow.)
Share the output returned by the last node
{
“response”: “Your message was invalid. Please make sure you are sending the exact text requested.”
}
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
