Describe the problem/error/question
I’m trying to get emails filter by subject that contains the keyword “receipt” or “invoice” and then forward it to the relevant email that will be ingested by an accounting software.
The issue I noticed is that the code node somehow doesn’t pass the binary forward, so in the code node, on the left side I’m able to download the attachment, but on the right of it, i can’t seem to download it.
Some emails do have attachments (pdf as receipts), some receipts are just the email body (html) itself, hence the if node as I can’t seem to get it to use “data” or “attachment_0” on the attachment field name in the Email Node.
What is the error message (if any)?
So when it gets to the Send email (gmail), it’s throwing all sorts of error and one of them are “The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined (item 0)”.
Please share your workflow
Share the output returned by the last node
The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined (item 0)
Information on your n8n setup
- n8n version: 1.103.1
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main): manually clicking “Execute workflow” and then firing a message via telegram to the bot
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Sequoia 15.5