How to send Binary File (PDF) using Move Binary Data and HTTP Request nodes

Hello, I face an issue when trying to send a binary file (pdf) using the HTTP Request node.

To give context, I am using http request to get an invoice which comes as text Base64 in response.

I use Move Binary Data to decode the Base64 response in Binary file, mime type application/pdf.

What is the error message (if any)?

image

image

I need help with a suggestion on how to properly decode the base64 text into binary file and send that binary file using http request.

Please share the workflow

Thank you!

Information on your n8n setup

  • n8n version: 0.204.0

Hi @alexnemes, your approach looks good and worked for me with a little fine tuning:

Of course, I don’t have access to your authentication data or other nodes in your flow, so I used generic services working without authentication here. The file does, however, arrive as it should on the server and is readable:

As for the error you are getting, perhaps you can experiment with the HTTP Request response options a bit? Something like a “Text” response format should hopefully replace the decimal data with a human-readable error that might help with understanding what your server expects:

image

1 Like

Thank you for your answer @MutedJam, It worked after I put the File Name option with the file name in Move Binary Data.

1 Like

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