I’m new to n8n, and I’m attempting the On Form Submission trigger. While it works for the text fields and those are sent to the discord channel, I’m also requesting an image upload and that image is failing to post using the webhook. I can see the binary file in the discord node, but all errors are pointing to the issue that it’s not a binary file, and that it’s an issue with it being passed as JSON.
What is the error message (if any)?
Problem in node ‘Discord‘
Cannot read properties of undefined (reading ‘error’)
Please share your workflow
As you can see in the screen shot below, I can see this as a binary, and I attempted adding it to the Input Data Field Name under files..
what you have in the field “Input data Field Name” is wrong, it should be the filename (especially prepended with word data, instead it should be the binary property name from the left side (in orange) - Upload_a_screenshot_of_your_characters_on_your_first_account. This long word with underscores needs to go there, without quotes or extra spaces.
Thank you for the guidance, unfortunately it still doesn’t seem to work. Entering it the same as you noted, it still fails to process:
data {{ $json[“Upload a screenshot of your characters on your first account”].filename }}
It still presents the same error as previously. It does suggest the following:
Your current expression for the file input is:
{{ $json["Upload a screenshot of your characters on your first account"].filename }}
However, the Discord node expects a binary property name (e.g., “data”) that points to the actual file data, not just the filename.
Suggested Solution:
Make sure that the file you want to send is available as a binary property in your item (e.g., $binary.data). If your input data does not include a binary property, you need to add a node (such as “HTTP Request” or “Read Binary File”) before the Discord node to load the file as binary data.
I’m unclear because this does seem to be presented as binary data… based on what I can see…
Can you show me the error which you get when you type in Upload_a_screenshot_of_your_characters_on_your_first_account
in that field? With the Discord node open please, so I can see both the field value and the error.
Ok thank you. That worked. Sorry for the confusion. After reviewing the previous response I thought I needed that extra info, and was under the impression that when the field came up with data I was supposed to append after that.