Seatable integration loses json properties

Describe the issue/error/question

When I query Seatable through the node, sometimes I don’t get back all the data.
Mainly I noticed it with false booleans, they are checkboxes that haven’t been interacted with.
Once I check and uncheck it, it gives back the property with false like expected.

Is the integration causing it, is Seatable causing it, or is that expected json behaviour to loose a property that is false?

Any hints are welcome!

Information on your n8n setup

  • n8n version: 0.164.1
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hey @leprodude,

It sounds like maybe the item doesn’t have a default value so has nothing to send back. With the node we will return whatever the api gives us so if Seatable returns nothing for it we won’t display anything.

I don’t have a Seatable instance set up but I can look into it on Monday.

The thing is they only option is to set the default value to checked, which implies that the default value is unchecked…

Hey @leprodude,

Have just given this a go and I am seeing…

This is with my data looking like this…

image

Doing a quick test with CURL seems to show that the Seatable API doesn’t return false if there is no default set. I will have to take a look and see if there is a way we can handle it, we can’t replace any empty value with false so we would need to know the data type to be able to do that.

Yes it seems like I will have to check if the property exists and then if it is true or false, which is quite bloated for a checkbox, especially If I use a lot of them…

Yeah that is a bit of a pain, Could be worth a feature request to the Seatable team :thinking: I will take a proper look and see what options we have on our side as well. If we can work out the type for the field we can just set it to false as long as it comes back.

I noticed that if I fetch a since row that doesn’t have a value in the box that field is just missed out completely.

Yes exactly that is the issue. Once you checked and unchecked it, it comes back like expected with a false value. Also opened a question there and it’s kind of expected behaviour.

So far I’ve solved it by using return {"ensuite": ('ensuite' in area && area['ensuite'] === true)}
checking if the property exists and is true. This way anything else gives me false.
Not super pretty, but also not as terrible as I was dreading!