Attachment pdf binary

Hello community, how are you?

I wanted to inquire about attaching a PDF file.
From the node “Send Email” I attach it as a binary when I receive it by email, I previously made the conversion to pdf, but if I attach it from the node “Gmail” it sends it as a pdf attachment, is there any parameter that is needed in the node “Send Email” to not send it as a binary?

Thank you very much as always!
Good week!
Regards,

Information on your n8n setup

  • **n8n version:1.74.3
  • **Database (default: SQLite):Postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):k8s
  • **Operating system:AWS

Hey @Internalit_Automatio, how is things?

I understand that you have a PDF file which you want to send using the Send Email node. However, it sounds like you don’t want to send it as a PDF but using a different format? Which format exactly should your attachment have?

I want to send it in pdf format, but when I attach it the person receives it as binary, and as attachment when you receive the mail in gmail it is binary, instead if I use the Gmail node and run the same workflow, it is attached as pdf file correctly, I think it is something of the Send Email Node when I want to send a pdf and I attach it as binary. Because at the same time that I send by mail I upload the same file to a drive and it is uploaded in pdf format

OK, so you already have the PDF file, it’s just not being sent as a PDF when you use the Gmail node? It worked fine for me when I tested it earlier, so I’m not quite sure what’s going wrong on your end just yet.

Perhaps you could share your workflow as well as the binary item you are passing on to your Gmail node?

For reference, my own test workflow looks like so:

And the binary item I am passing on to my Gmail node looks like this (pdf extension + application/pdf MIME type):

1 Like

Hi @MutedJam !

With the Gmail node, it is sent correctly, when I send it with the “Send Email” node it sends it as binary.

Ah, sorry for my confusion.

I just tested the workflow with the Send Email node:

However, I still seem to be getting the expected PDF:

Any chance you can share a simplified example workflow using which the problem can be seen as well as the binary file details (in case your PDF isn’t publicly available)?

1 Like

Could it be that the error is because I am converting it before?

1 Like

Quite possible! Perhaps you can share a screenshot of the binary output of your Obtenemos documento en pdf and convertimos el file binary en pdf nodes?

Here:


In the gmail node it attaches well as pdf but in the Send Email it leaves it as binary.

Oh, could the problem be that the filename field itself does not include .pdf? When trying to send a file without this suffix I am getting a result like this:

When using a filename ending with .pdf the message looks like so instead:

Perhaps you can try adding .pdf at the end of the file name in your convertimos el file binary en pdf node? Like so:

1 Like

@MutedJam

I added .pdf to the name and it worked perfectly.
Thank you very much as always, and have a great week!

Regards!

1 Like

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