# NodeRed thingspeak payload

**URL:** <https://discourse.nodered.org/t/nodered-thingspeak-payload/5330>\
**Category:** General\
**Created:** [30 November 2018 08:12 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330 "2018-11-30T08:12:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 08:12 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/1 "2018-11-30T08:12:22Z")

</div>

Hello People im trying to send data from TTN to things speak but my payload is something like that {"payload":"F1:0.000,F2:0.000,F3:0.000,F4:0.000,"} ,thethingsspeak42 didnt work for me in node Red  
but i used somethings else but i get this data in one field in my thingspeak channel, i want a way for me to separate this payload before sending it where i can have (output:F1) ,(F2)..... separately .

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 November 2018 08:27 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/2 "2018-11-30T08:27:07Z")

</div>

So to be able to help you it would be better to have a read example of your data rather than "it's something like"  
because if it's slightly different from that the advice people give you will be wrong.

Are you sure your full message in node-RED is

```auto
msg.payload.payload="F1:0.000,F2:0.000,F3:0.000,F4:0.000," 

```

If that is the case, you will need to move msg.payload.payload to msg.payload (using a change node)  
and then you can configure the split node to split on the comma and send the results as separate messages.  
each of these messages will still have the output as a string.  
eg msg.payload=""F1:0.000"

---

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 08:31 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/3 "2018-11-30T08:31:59Z")

</div>

yes this is my output data ,im sorry im new to node red ,how can i change this ? i want to spilt it to 4 ouputs  
like F1  
F2  
F3  
F4

---

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 08:34 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/4 "2018-11-30T08:34:28Z")

</div>

> [@ukmoose](#):
>
> msg.payload.payload to msg.payload

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b10a032f05238749d1b8e6fc82e8f4131625486a.png)

you mean like that

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 November 2018 08:42 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/5 "2018-11-30T08:42:33Z")

</div>

No.

With that you are Searching and replacing in the change node.  
As I said you need to `move` so change the `Change` to `Move`

---

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 08:53 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/6 "2018-11-30T08:53:21Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/662b8d56bf8a062fd09b2a2ad03aa36fbaa5af9c.png) thanks but now i have the fifth one empty ,do u know how i can remove it

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 November 2018 09:00 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/7 "2018-11-30T09:00:51Z")

</div>

You could try playing with the switch node

or click the checkbox in the split node "Handle as a stream of messages"

---

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 09:03 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/8 "2018-11-30T09:03:14Z")

</div>

Thank you i appreciate your help

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 November 2018 09:06 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/9 "2018-11-30T09:06:02Z")

</div>

The 5th one is empty as you are sending an empty value - (caused by the extra comma at the end of your payload...

```
00," 

```

So really the sender should not send it...

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [30 November 2018 09:08 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/10 "2018-11-30T09:08:41Z")

</div>

Pleasure, I would suggest now spend time going through one of the online tutorials for Node-RED to understand the build in capabilities of some of the nodes

---

<div class="post-metadata">

**Author:** ![yoyo89](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@yoyo89](https://discourse.nodered.org/u/yoyo89)\
**Post date:** [30 November 2018 21:05 UTC](https://discourse.nodered.org/t/nodered-thingspeak-payload/5330/11 "2018-11-30T21:05:35Z")

</div>

the things speak42 still didnt work i dont know why? the other one in node red works but it doesnt aggregate data ,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fc7d6dea4fa102e4d3794dc748d3624d99da8094.png)
