Download gmail attachment and transfer to FTP server

Hi Trying to transfer an attachment from gmail to FTP server.

n8n is already connected to my gmail using IMAP and my FTP server as well,but I have issue with the uploaded xlsx file (gmail attachment), the file is corrupted with only 1KB once the file transfer to FTP, its originally 2MB may I know what I need to check or to add/change on my settings?

Hey @rodskie123,

Have you checked that the file on the OS that you are uploading is correct? It could be that it is creating an empty file, Are you able to share the full workflow as well?

Not sure about share full workflow but when I execute my workflow all steps are functioning but the output file is not right :frowning: it only have 1kb and when I open it its corrupted file, may I know what I need to change or add with my configuration?

I only have 2 steps

image

since my plan is straight upload of attachment from gmail to my server

Hey @rodskie123,

So the problem there is likely going to be that the file is not being written to disk, When you use the “Download Attachments” option it keeps it in memory until you use the Write Binary File node. Looking at your example again it looks like you are creating a new file and just setting the content to be “EMPLOYEEID” I suspect if you open the file using a text editor it would show this.

What you need to do set the Binary Data option in your FTP node and try setting the value to attachment_0 and seeing if that helps.

It works!, thank you.