IMAP attachment to FTP Server

Describe the issue/error/question

Hi, im trying to make a simple workflow, but i cant make it works.
I need to download an email attachment and upload it to a FTP server.
I try with two nodes (IMAP and FTP) and with an intermediate node (MOVE BINARY DATA).

Please share the workflow

Share the output returned by the last node

NodeOperationError: No binary data property "[object Object]" does not exists on item!
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:414:39)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:47

Information on your n8n setup

  • n8n version: 0.165.1
  • Database: Postgres
  • Running n8n with the execution process own(default):
  • Running n8n via Docker:

You do not need the Move Binary Data node at all. The IMAP node already returns the attachment as “binary data”. Also, in the SMTP node, specifically the binary data parameter, you set the value to an expression, and it should be set to the name of the key that holds the binary data returned by the IMAP node. Assuming that you keep the defaults in the IMAP node, it should be attachent_1 or whatever before you set in the IAMP node.

Let me know if that helps.

Hi Ricardo, yes, now im trying to connect directly to de IMAP but i dont understand how to tell to the FTP node how to use the attachment:

That gives me:

NodeOperationError: No binary data property "[object Object]" does not exists on item!
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:414:39)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:47

Instead of an expression, just set the value to attachtment_0

No :frowning:

Did you delete the move binary data node? What is the input of the SFTP node? Specifically the binary tab.

Yes, i have deleted that node.

The SFTP node input:

image

I meant the output of the node previous to the SFTP node. Specifically the binary tab.

Sorry.

IMAP output:

Hi, I had the same problem. Solution here: The property names aren’t equal. The IMAP Node writes to attachment_0. So the SFTP Node should also use attachment_0 instead of attachtment_0.

To upload all files from the mail to the SFTP server it’s necessary to give the same binary output name (e.g. data). Therefor one has to use the split binary node. If one uses the node one has to change the binary property name to data.

2 Likes

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