I’m pulling a PDF from an external API using Webhooks by Zapier (GET). The request works (I can download and view the PDF outside Zapier), but the API returns the PDF base64-encoded inside JSON. I need to convert that base64 into a single file object I can attach in later steps (Google Drive upload / Gmail attachment), but I can’t get Zapier to expose it as one “file” field — it keeps showing separate fields (filename/mime/content) or plain text.
My goal is to convert the JSON response { status: 1, data: "<very long base64>" }
into a proper file output so downstream actions treat it as a file (I’ve read somewhere it shows as “Exists but not shown”).
Sample of the response headers: content-type: text/html; charset=UTF-8
, content-encoding: gzip
What I’ve already tried:
-
Returning three top-level outputs (
filename
,mime_type
,content
), downstream apps see them as three separate text fields, not a file. -
Wrapping under a single
file
key as{ file: { filename, mime_type, content } }
(JS) /{"file": {...}}
(Python), still not consistently getting a single “file” output; sometimes I only see the pieces. -
JSON.rawJSON(...)
on the Code step output, no change. -
I also tried cleaning the payload (trim everything before
%PDF-
), then re-encoding to base64.