PDFs from GetMyInvoices → OneDrive = corrupted – Base64 issue?

Hey community,

I’m running into a weird problem and would love some input.

I’m using the following setup in Make:

  • GetMyInvoices - Watch Documents

  • GetMyInvoices - Get a Document

The document seems to come through as Base64, and when I try to upload it to OneDrive (using the regular OneDrive upload module), the file gets saved as a PDF, but it’s corrupted every time. Can’t open it in any PDF viewer.

I’ve tried a bunch of things:

  • Decoding with ToBinary()

  • Running custom JavaScript inside Make

  • Even tried some Python and a few external tools
    → no luck so far. Either the output is still broken, or the module doesn’t accept it at all.

I feel like I’m missing a simple step. Maybe there’s a cleaner way to fetch the raw binary and skip the Base64 entirely?

Has anyone got this working end-to-end? I’d be super thankful for any ideas or working examples. Happy to share more details if needed.

Cheers,
Marc

Welcome to the Make community!

To convert Base64 to binary, you can use the built-in function:

However, you will need to specify that the input is encoded in base64 instead of plaintext.

Here’s an example of how you can use this function:

{{ toBinary(1.data; "base64") }}
(copy-paste the above into the field, or type it exactly as shown)

e.g.:
Screenshot 2025-08-29 180843

Hope this helps! Let me know if there are any further questions or issues.

@samliew

2 Likes

Amazing - thank you !!!

2 Likes