# Format message from Node Red to Influxata Cloud2

**URL:** <https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211>\
**Category:** InfluxDB 2\
**Created:** [June 2, 2021, 5:41pm UTC](https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211 "2021-06-02T17:41:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arturo\_Sanchez\_Remon](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/arturo_sanchez_remon/32/5981_2.png) [@Arturo\_Sanchez\_Remon](https://community.influxdata.com/u/Arturo_Sanchez_Remon)\
**Post date:** [June 2, 2021, 5:41pm UTC](https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211/1 "2021-06-02T17:41:22Z")

</div>

Hi all,

I am new in this system. I would try to send the temperature from a DHT11 sensor, via Node Red. But it is impossible. This is the only response fron the system;

“unsupported input type for mean aggregate: string”

How I need to format the message to visualize in InfluxDB? Its necesary a script in InfluDB or in Node Red.

The Node Red mesage is this:

{“measurement”:“weather\_sensor”,“temperatura”:5.5,“humidity”:51,“timestamp”:“2021-06-02T17:40:56.734Z”,"\_msgid":“930f33cf.81b13”}

Thanks in advance

---

<div class="post-metadata">

**Author:** ![srbp](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@srbp](https://community.influxdata.com/u/srbp)\
**Post date:** [June 2, 2021, 7:42pm UTC](https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211/2 "2021-06-02T19:42:50Z")

</div>

hi, there are more ways to do that.

what i was using in the past was

node: template [to format your payload for curl command] → node: exec

{curl --request POST “[http://192.168.0.106:8086/api/v2/write?org=foookin\_paavel&bucket=modrin&precision=s](http://192.168.0.106:8086/api/v2/write?org=foookin_paavel&bucket=modrin&precision=s)” --header “Authorization: Token TTTTT” --data-raw “temperature\_external,host=ttn\_node\_red,TempSenKey=1,TempUlId=7c9ebdf1ff64 TempDecimal=19.625,TempKey=18635 1622662706”}

pavel

---

<div class="post-metadata">

**Author:** ![Arturo\_Sanchez\_Remon](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/arturo_sanchez_remon/32/5981_2.png) [@Arturo\_Sanchez\_Remon](https://community.influxdata.com/u/Arturo_Sanchez_Remon)\
**Post date:** [June 2, 2021, 7:48pm UTC](https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211/3 "2021-06-02T19:48:51Z")

</div>

Sorry, but I don’t understand your idea, can you explain me with a photo?

This is that I’am using:

 ![Screenshot_3](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/7/73271bd42a42e7f905d562fe335698e0eee39371.png)

Function’s script:  
msg = {

```
    measurement: "weather_sensor",

        temperatura: 5.5,
        humidity: 51,

    timestamp: new Date()

```

};  
return msg;

Thanks in advance

---

<div class="post-metadata">

**Author:** ![mhall119](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mhall119/32/3898_2.png) [@mhall119](https://community.influxdata.com/u/mhall119)\
**Post date:** [July 6, 2021, 2:21pm UTC](https://community.influxdata.com/t/format-message-from-node-red-to-influxata-cloud2/20211/4 "2021-07-06T14:21:08Z")

</div>

> [@Arturo\_Sanchez\_Remon](#):
>
> This is the only response fron the system;
> 
> “unsupported input type for mean aggregate: string”

Where are you seeing this error message?
