How to Convert to Base64 for Airtable File Upload?

Hi everyone,

I’m trying to upload a document to Airtable (image 1) using their API (Upload Attachment). The issue I’m facing is that I don’t have a direct URL to the file, and I need to provide the file as a Base64-encoded string.

In a previous module (image 2), I’m getting a file as an IMTBuffer. Now, I want to convert this IMTBuffer into a Base64 string so that I can upload it to Airtable (image 3).

Does anyone know how to convert an IMTBuffer into Base64 in Make? Or is there a better approach to get the file into the format needed for Airtable API?

Thanks in advance for your help! :blush:

Image 1:

Image 2:

Image 3:

Hey there,

Can you wrap the functions as:

Yes, that worked, but the PDF in Airtable is empty.

I suspect that the formula is still not correct. Could it be that the function only works for text and not for PDFs in hex format?

I have found the solution. The issue was caused by the use of toString, and I had to remove it to make it work correctly.

In the HTTP module, I then inserted the previously defined variable.

4 Likes