# Store complete msg object in InfluxDB

**URL:** https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025
**Category:** General
**Created:** [3 January 2022 08:35 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025 "2022-01-03T08:35:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jlazkano](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlazkano/32/53468_2.png) [@jlazkano](https://discourse.nodered.org/u/jlazkano)
#### Post date: [3 January 2022 08:35 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/1 "2022-01-03T08:35:28Z")

</div>

Hello,

I have a crypto value object that want to store in a InfluxDB server:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4d056b8a5e0bf82f8c4420a9ec6e1a9a5a944e2a.png)

I have configured a 1.8v Influx server:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/5/351e8884c261c2fd6cce674922e676748d339cfd.png)

But I get this error:

`Error: A 400 Bad Request error occurred: {"error":"unable to parse 'msg.payload BIDR=[object Object],BTC=[object Object],BVND=[object Object],IDRT=[object Object],RVN=[object Object],SHIB=[object Object],USDT=[object Object],XEC=[object Object]': invalid boolean"}`

How could I save all object values in the InfluxDB server?

I will appreciate your help.

Kind regards.

---

<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: [3 January 2022 09:01 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/2 "2022-01-03T09:01:16Z")

</div>

Welcome to the forum @jlazkano

You can't just send a complex object to an influxdb. First you need to understand more about influx. Please go and browse the influx docs for the version of influx you are using (1.8 or 2.0).

Once you understand about influx measurements, fields, and tags (or the equivalent in v2.0), and know how you want to structure the database, then look at the help text for the influx node and work out what payload you need to send.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [3 January 2022 18:20 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/3 "2022-01-03T18:20:44Z")

</div>

Postgres, mongo or other document type database is more suited to this task.

---

<div class="post-metadata">

### Author: ![jlazkano](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jlazkano/32/53468_2.png) [@jlazkano](https://discourse.nodered.org/u/jlazkano)
#### Post date: [4 January 2022 10:46 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/4 "2022-01-04T10:46:19Z")

</div>

Thanks for the replies.

I add a InfluxDB node for each currency:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c0b62be728fb1b53d7068973274636a40306fbe4.png)

Now it works, thanks for your help.

Kind regards.

---

<div class="post-metadata">

### Author: ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)
#### Post date: [4 January 2022 14:07 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/5 "2022-01-04T14:07:54Z")

</div>

I'm not sure this actually "works" as you would expect... it looks like this would create 3 measurements, with 1 tag/value for each currency. Wouldn't it be better to restructure your payload to be a single measurement, with tags/values for each currency?

Sorry if this is a noob question -- it has been years since I looked at Influxdb, so perhaps there is a distinction here that does not really matter to the app that will be displaying this data.

---

<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: [5 March 2022 14:08 UTC](https://discourse.nodered.org/t/store-complete-msg-object-in-influxdb/56025/6 "2022-03-05T14:08:09Z")

</div>

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