Help with HTTP Module: Handling Missing JSON Fields for Google API Book Data

Hello Make.com Community,

I’m currently working on a scenario where I want to use an AirTable as a library system. Here’s a quick breakdown of what I’m trying to achieve:

• I can add an ISBN to the AirTable via a shell script.
Make.com should check this AirTable once a day, and if any new values are added, an automation runs that uses the Google API to download book information (title, authors, publication date, and cover).
• ChatGPT is then used to assign tags and genres (Fiction, Non-Fiction, Faction) to the book from a predefined list of tags.

This setup worked perfectly until the scenario encountered a book without a cover in google books. In the HTTP Get module, the JSON response doesn’t include the “thumbnail” field, which causes the whole process to fail.

What I’ve tried:
• I tried working with emptyarray, but that didn’t solve the issue. The root cause seems to be the missing “thumbnail” value in the HTTP module.

Possible Solutions:
• I suspect I need to handle this with the mapping function in Make.com, but I’m not familiar with how to implement this as it’s my first time using the platform.
• If I were working in Python or Shell, I would know how to handle the missing field, but I’m struggling to figure out how to do this in Make.com.

Any advice on how to handle missing JSON fields (like “thumbnail”) in Make.com would be greatly appreciated!

Thank you for your help!

BookTrack Library Blueprint.json (72.5 KB)

Hello! Welcome to the Make Community!

Thanks for your detailed description and the blueprint!
But it’s a little hard to figure out where it fails. Can you show us a screenshot of the module where it fails?

Usually in the mappings, you can add misc functions. One idea is to check if the variable is empty. If not, you set it, if empty you set any arbitrary value, such as ‘NA’ or emptystring… It depends on what the target API allows.

For example, your Create Variables after the HTTP module could look like this

or this

Please note that most fields from Google Books are in Arrays apparently, so maybe they can contain multiple items. If you don’t set any index (the way you did), Make will automatically pick the first item.

Benjamin

1 Like

Hey Benjamin,

Thanks for your help!

The empty string worked!

One problem was that I used the mapping function in the last step. Without it, it can handle it better, and it works now!