# Problem sending sensor data to Gsheet

**URL:** <https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024>\
**Category:** General\
**Created:** [8 October 2021 16:53 UTC](https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024 "2021-10-08T16:53:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJsolanonavarro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cjsolanonavarro/32/49172_2.png) [@CJsolanonavarro](https://discourse.nodered.org/u/CJsolanonavarro)\
**Post date:** [8 October 2021 16:53 UTC](https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024/1 "2021-10-08T16:53:24Z")

</div>

Hi everyone,  
I am receiving data through the serial port as a string and I want it to write the values ​​in each column and what it does is write the whole chain of values ​​in a column.  
I am doing I pass it through a JSON node (attached photo configuration node) and then I pass it through a CSV node (attached photo configuration node) and then I connect it to the Gsheet node (attached photo configuration node) and the debug. I would appreciate any help since I have been working with this type of programming for a short time. Thanks in advance

 ![Captura de pantalla de 2021-10-08 18-04-22](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/92462eceefc340815faaff7eee724242ef493d50.png)  
 ![Captura de pantalla de 2021-10-08 18-04-56](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/023f94180af762ff29627c44a6a3b098e0ad743a.png)  
 ![Captura de pantalla de 2021-10-08 18-07-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/91e9bbd8bc404b3ab26e109069e4cb0c48465b2d.png)  
 ![Captura de pantalla de 2021-10-08 18-09-38](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c9d7081be3a5696eb6d98df2732ada793e3d7e21.png)  
 ![Gsheet](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e48d66e2b7372f433e1f0ed839032adccd48f630.png)

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [11 October 2021 09:55 UTC](https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024/2 "2021-10-11T09:55:20Z")

</div>

Welcome to the forum.

I believe your problem boils down to the need to split a string into text & integers, and then create the CSV. For this, some good Function and Change nodes were proposed when I had a similar issue. [See here](https://discourse.nodered.org/t/split-string-into-text-and-integers/49889).

Another possibility is to use [this node](https://flows.nodered.org/node/node-red-contrib-json2csv). It's very old, but it worked for me in a simple use case where passing thru the JSON and the Change nodes did not work correctly.

---

<div class="post-metadata">

**Author:** ![CJsolanonavarro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cjsolanonavarro/32/49172_2.png) [@CJsolanonavarro](https://discourse.nodered.org/u/CJsolanonavarro)\
**Post date:** [12 October 2021 17:16 UTC](https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024/3 "2021-10-12T17:16:49Z")

</div>

Hi, I have updated nodejs to the latest version v14.18.0 and npm also to version v8.0.0 and I have tried to install the json2csv node that you were telling me, from the manage palette and from the terminal and it gives me an error. How can I install it?  
 ![pantallazo fallo instalación json2csv](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/23670cf7c37114199c30837bba551949ff962e30.png)

---

<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:** [11 December 2021 17:16 UTC](https://discourse.nodered.org/t/problem-sending-sensor-data-to-gsheet/52024/4 "2021-12-11T17:16:59Z")

</div>

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