HTTP Get a File receives Binary instead of JSON

Greetings all together,

I’m trying to retrieve a JSON file via a webhook, but I only get back binary data from HTTP (Get a File) that I can’t parse. I need the data to send it field by field to Google Sheets.

As you can see, the webhook contains the link to the json file. When I copy the link into the browser, the download starts. But when I try to get it via HTTP module, it only gets file.bin data.

Whats the issue? Thanks a lot!

Welcome to the Make community!

The problem is the encoding issue when downloading certain files.

I have mentioned a possible workaround for this here: Read text in .txt file stored in google drive - #4 by samliew

You can use a “Convert encoding” module using the same input and output encoding, then you can use the output of this module in your Parse JSON module.

Alternatively, you can simply try using the toString built-in function in the mapped field, something like this:   toString(data)

3 Likes

Thanks @samliew,

this could work, but requires a separate operation. I prefer the solution of using the toString function, which is also mentioned here: How to download a file that requires authentication - #4 by Callinetic

But in case this doesn’t work under any circumstances, I have your solution in mind.

Thanks a lot!

1 Like