I’ve been using this automation in the past without problem. The setup is as follows: HTTP node downloads an image and returns it as file (binary). I can view and download that image from the n8n workflow, which means that part still work. That image is then passed onto a discord node which sends a message and attached the image as File. Connection method is Webhook.
This is worked flawlessly before. Recently I reactivated it but now the Discord node returns following error:
The “chunk” argument must be of type string or an instance of Buffer or Uint8Array. Received type boolean (false) [item 0]
Item 0 should be the first item in the input data. However that item does have a valid image (binary data).
There is no mismatch between json data and binary data, both have the same amount of items.
The workflow works fine if I remove the “File” from the Discord node.
All I want is the message to have an image. So if there is an other method to achieve that I’m happy too. I do have an URL to the image but even when inserting that into “URL image” or “URL Thumbnail” it doesn’t show up in discord.
The most reliable way to bypass this bug and get your images back into Discord is to use the HTTP Request node to communicate with the Discord Webhook directly.
Here is exactly how to set it up:
Replace the Discord Node with an HTTP Request node.
Method: Set to POST.
URL: Paste your Discord Webhook URL here.
Authentication: None (Webhooks are authenticated by the URL itself).
Send Body: Toggle this On.
Body Content Type: Select Form-Data (Multipart).
Specify Body Parameters:
File Upload:
Click Add Parameter →→ select Binary File.
Name: Enter file (This is the exact key Discord expects).
Input Data Field Name: Enter thumbdata (matching your binary property name).
Message/Embeds:
Click Add Parameter →→ select Text.
Name: Enter payload_json.
Value: Enter the JSON for your message and embeds.
Example:{"content": "Here is your image!", "embeds": [{"title": "Image Title", "description": "Description here"}]} (You can use expressions here to pull data from your previous nodes, just ensure the final result is a valid JSON string).