Skip to main content

Hi everyone,

I'm using a webhook to recieve a .pdf file, which gets send as a base64 string. I'm having a hard time processing this base64 string to a file so I can use it in a “Send Email in SMTP by Zapier” or “Create File From Text” step by Google Drive.

Why I think it should work

I can create a link <a href=”data:application/pdf;base64,{{base64}}">Download here</a> and put it in a .html file, and it will download the file without problems. T hat's why I feel it should be possible to use the file in Zapier in some way.

I've used PDF.CO's (https://pdf.co/tutorials/base64-to-pdf-zapier) Custom API call to create a PDF with the base64 string, which works. But I feel like it should be possible otherwise (without paying €10 per months to download a PDF).

What I have tried so far

I have tried everything mentioned in 

 and saw someone post a similar quesiton (

) but neither have an answer for me.

I have tried using the “Decode a Base64 String in Base64 Encoder/Decoder” but the decoded string contains cannot handle non-ascii characters, so it will render an empty .pdf. Decoding it using javascript functions (atob) fail to decode the non-ascii characters as well.

I hope someone can help me with this, I've been trying out so many different things, but can't seem to get it working. 

Best,

Caspar

Seems this is asked a lot and ​@Troy Tessalone valiantly responds each time, but it’s never resolved.

This is NOT file Hydration. The file exists and we have the base64 encoded pdf and we need to turn it into a zapier ‘file’. 

 

I tried code steps, but there’s really no documentation about what functions are available. 

 

I found a link that indicated you could send the raw base64 data to Google Drive as a ‘file’ and it would turn it into a real PDF then you pull it back from the drive but…. could not figure that out.  

 

Giving up for today.

 

 

 

 


@Akrause 

This AI suggestion might be worth a try...

 


Thanks I tried Javascript and Python versions of LLM suggestions but they don’t know enough about Zapier’s special environment. 

This example worked with a minimal test PDF file, but put out not a file object, but a long decoded string named ‘file’. 

I guess I’m giving up and going with PDF.co but this is very basic and zapier should implement this.

 

 


I guess it should be part of the “files” from text option block.