Changing 1/0 to TRUE or FALSE

Describe the issue/error/question

I’m reading data from a form (webhook) that provides fields with 1 or 0 depending if a box is checked. I need to give this to Google Sheets as TRUE or FALSE for checkboxes to work properly, but I can’t figure out how to use an expression to transform the value. I’ve looked up a few similar-ish forum posts but didn’t find anything useful.

Information on your n8n setup

  • n8n version: latest
  • Database you’re using (default: SQLite): Unknown
  • Running n8n with the execution process [own(default), main]: own(?)
  • Running n8n via [Docker, npm,, desktop app]: docker, via Cloudron

Do you want the boolean true/false? Then you would have to use true or false.
Do you want the string TRUE/FALSE? Then you would have to use "TRUE" or "FALSE".
TRUE or FALSE will not work.

Apart from that does what you did look good.

:man_facepalming: I can’t believe I didn’t try that, I thought it was a seperate data type for some reason, thank you!

Glad to hear that it helped! You are welcome. Have fun!

Ah and overlooked that you are new. So welcome to the community @ianhyzy, great to have you here!

1 Like