Google Sheets IF no data

I’m writing data to a google sheet from a webhook. Sometimes I don’t have any data from the webhook for that entry, so I’d like it to show a 0. I have about 10 columns that have different data. I could write a bunch of IF conditions for each column but I’m hoping there is an easier way.

Is there a way I can do an if statement in the Set node? Any data I do receive has to be divided by 100. So this is what I currently have:
={{$node["Data: Reservation"].json["Service Fee"]}}/100

You can try something like:

{{($node["Data: Reservation"].json["Service Fee"] !== 0) ? $node["Data: Reservation"].json["Service Fee"] /100 : 0 }}

3 Likes

Thank you Sir. I saw this in the documentation and I couldn’t get it to work. I’ve no idea what I was doing wrong. Your example has worked flawless!

Happy that it worked. Have fun.