# InfluxDB unable to parse invalid boolean

**URL:** <https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482>\
**Category:** General\
**Created:** [21 September 2023 21:07 UTC](https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482 "2023-09-21T21:07:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paular](https://avatars.discourse-cdn.com/v4/letter/p/b5a626/32.png) [@Paular](https://discourse.nodered.org/u/Paular)\
**Post date:** [21 September 2023 21:07 UTC](https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482/1 "2023-09-21T21:07:34Z")

</div>

Hello,

When I inject the following json into influxdb out node I encounter the following error :

`Error: A 400 Bad Request error occurred: {"error":"unable to parse 'msg.payload fields=[object Object],measurement=\"thermostat\",tags=[object Object]': invalid boolean"}`

Here is my function :

```auto
msg.payload =
{
    measurement: "thermostat",
    fields: {
        battery: msg.payload.battery,
        local_temperature: msg.payload.local_temperature,
        setpoint_temperature: msg.payload.occupied_heating_setpoint
    },
    tags: {
        object: "danfoss_ally_entree"
    }
}
return msg;

```

Regards

 ![Capture d’écran 2023-09-21 à 22.50.05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4ef1ce9033df0ddc1bf3a78cea93fc7adc0a7855.png)  
 ![Capture d’écran 2023-09-21 à 23.05.04](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/25ec87beedc082e10e45c16874b566056b72be73.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 September 2023 21:20 UTC](https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482/2 "2023-09-21T21:20:54Z")

</div>

That is not a valid message for feeding to the influx out node. Read the help text for it more carefully. I haven't got any time at the moment to go into details.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 September 2023 15:54 UTC](https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482/3 "2023-09-22T15:54:06Z")

</div>

If you haven't managed to work it out, this is probably how you need to structure the data, from the help text:

If **msg.payload** is an array containing two objects, the first object will be written as the set of named fields, the second is the set of named tags.

And if you don't want to configure the measurement in the node then:

If the _measurement_ field is not set in the node configuration, the user can send in data with a specified measurement name in **msg.measurement** to overwrite the _measurement_ field in the configuration of the node.

Note, that is msg.measurement, not msg.payload.measurement.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 November 2023 15:54 UTC](https://discourse.nodered.org/t/influxdb-unable-to-parse-invalid-boolean/81482/4 "2023-11-21T15:54:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
