Course Level 2 - Workflow 2 - Encountering error messaage

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:
1 Like
The workflow below is the exact workflow I am using for Course Level 2 – Workflow 2. The issue described occurs with this setup.

{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
48,
144
],
“id”: “a09ffad9-6808-4993-9bc9-7adf55c722bb”,
“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”: “a459cf3eb3ca1129ba1d8a00ef41c62a”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
416,
-16
],
“id”: “746ac896-9b7f-409e-9542-fa52a221d18a”,
“name”: “HTTP Request1”,
“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”: [
400,
272
],
“id”: “8679301b-c2a8-4014-ad8d-3282f6f2629f”,
“name”: “Search records1”,
“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”: [
640,
96
],
“id”: “b396bfbf-708f-416c-8301-d8a76ebdd916”,
“name”: “Merge1”
},
{
“parameters”: {
“sortFieldsUi”: {
“sortField”: [
{
“fieldName”: “orderPrice”,
“order”: “descending”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.sort”,
“typeVersion”: 1,
“position”: [
848,
96
],
“id”: “30a3a669-b967-416a-8fea-8527da6249a7”,
“name”: “Sort1”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “ab45e185-303a-4bcf-878d-2853e34f02e5”,
“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”: [
1056,
96
],
“id”: “499880d8-b076-4ea4-8423-38a12fb2cf94”,
“name”: “If1”
},
{
“parameters”: {
“operation”: “toJson”,
“mode”: “each”,
“options”: {
“fileName”: “={{ $json.orderID.toString() }}”
}
},
“type”: “n8n-nodes-base.convertToFile”,
“typeVersion”: 1.1,
“position”: [
1264,
-16
],
“id”: “e43e6914-962b-454f-9fd1-a653e41036a8”,
“name”: “Convert to File1”
},
{
“parameters”: {
“sendTo”: “[email protected]”,
“subject”: “level two n8n”,
“message”: “See attachements”,
“options”: {
“attachmentsUi”: {
“attachmentsBinary”: [
{}
]
}
}
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.1,
“position”: [
1472,
-16
],
“id”: “07bed0da-037b-4148-ab5b-8a02c8e60642”,
“name”: “Send a message1”,
“webhookId”: “b5e863b2-f4a4-4bed-9935-032e9da90d7a”,
“credentials”: {
“gmailOAuth2”: {
“id”: “cWSBHCpd06NLBr5x”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“authentication”: “webhook”,
“content”: “=I sent the file using email with the label ID {{ $json.id }}. My ID: a459cf3eb3ca1129ba1d8a00ef41c62a”,
“options”: {}
},
“id”: “2a045432-9263-4aa2-9e90-2521daf17114”,
“name”: “Discord1”,
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 2,
“position”: [
1696,
-16
],
“webhookId”: “ec8da658-5989-4c14-8b77-fb26850479c3”,
“credentials”: {
“discordWebhookApi”: {
“id”: “AUKWj6P9FfOVokmy”,
“name”: “Discord Webhook account”
}
}
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “HTTP Request1”,
“type”: “main”,
“index”: 0
},
{
“node”: “Search records1”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request1”: {
“main”: [
[
{
“node”: “Merge1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Search records1”: {
“main”: [
[
{
“node”: “Merge1”,
“type”: “main”,
“index”: 1
}
]
]
},
“Merge1”: {
“main”: [
[
{
“node”: “Sort1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Sort1”: {
“main”: [
[
{
“node”: “If1”,
“type”: “main”,
“index”: 0
}
]
]
},
“If1”: {
“main”: [
[
{
“node”: “Convert to File1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Convert to File1”: {
“main”: [
[
{
“node”: “Send a message1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Send a message1”: {
“main”: [
[
{
“node”: “Discord1”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “462bc48ca59b21e7a035149841911b6deb17aefb21ba1e7d8684d47f13eccbdb”
}
}

1 Like

Hi @HugoSan ,

Did you encounter any issues with workflow 3 when taking the course level test?

@luarn this worked for you? can you send the full mesage here to help others facing similar issues?

Yesterday, I ran into the same error and had to use this workaround to post the message to Discord.
When I tried again today, I found that it’s no longer necessary—you can now post it directly like this:

I sent the file using email with the label ID {{ $json.labelIds }}. My ID: 092e549fc7eef931eca440818e1c4339

Hi
Did you encounter any issues with workflow 3 when taking the course premium level test?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.