# Post Data to Google Sheets Particel

**URL:** <https://forums.losant.com/t/post-data-to-google-sheets-particel/1262>\
**Category:** Help\
**Created:** [November 23, 2018, 11:43pm UTC](https://forums.losant.com/t/post-data-to-google-sheets-particel/1262 "2018-11-23T23:43:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Cunningham](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/thomas_cunningham/32/771_2.png) [@Thomas\_Cunningham](https://forums.losant.com/u/Thomas_Cunningham)\
**Post date:** [November 23, 2018, 11:43pm UTC](https://forums.losant.com/t/post-data-to-google-sheets-particel/1262/1 "2018-11-23T23:43:18Z")

</div>

Hello,  
I read the few posts on sending data to google sheets using IFTTT. I used to publish my data from Particle in json format using a webhook. Now that I found Losant I love the graphing functions but need more of the google sheets options for my data.

Currently, my data is being sent to Losant as a string. See the example below. How do I convert this data and send it to my sheets? I have tried a few different things but still not getting the data over.

Thank you

Device State Pic

 ![11%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/3772afa2586b96181f383867436ae920d357d4ee.png)

Google Sheets Header Pic

 ![36%20PM|an90x55](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/07a53e3c3933b7a209d355c990e698816cdb62a2.png)

I tried a HTTP output but was not able to get it to work for me.  
HTTP Pic

 ![01%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/53d24bc2b9347d88aa08275a28ed4a2a7ba0db0a.png)

Any help would really be appreciated.

Thank you very much and Happy Thanksgiving.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [November 26, 2018, 3:47pm UTC](https://forums.losant.com/t/post-data-to-google-sheets-particel/1262/2 "2018-11-26T15:47:07Z")

</div>

We looked into adding Google Sheets workflow nodes in the past, but for any operation other than reading from a public spreadsheet, the user must provide a token obtained through [Google’s OAuth 2.0 authorization flow](https://developers.google.com/sheets/api/guides/authorizing), which is something we can’t replicate within the workflow engine as it requires user action.

You **could** use the server-to-server authentication method outlined [here](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) but it’s quite a bit involved, and it requires you having a G Suite account and doing a lot of setup on the Google side.

You could then take the token generated through this process and use the [HTTP Node](https://docs.losant.com/workflows/data/http/) to make requests against the [Google Sheets API](https://developers.google.com/sheets/api/guides/values).

If that’s not an option, you can also use Losant’s [data tables](https://docs.losant.com/data-tables/overview/) feature to store additional data within your application. Tables are subject to some pretty strict limits in a sandbox environment, so you would have to move your application to a paid organization plan to do anything production-ready within them.

Let us know if you pursue the Google Sheets option and if it’s a smooth process! We’d love to hear if it’s something our users can easily accomplish.

---

<div class="post-metadata">

**Author:** ![Thomas\_Cunningham](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/thomas_cunningham/32/771_2.png) [@Thomas\_Cunningham](https://forums.losant.com/u/Thomas_Cunningham)\
**Post date:** [November 30, 2018, 5:09pm UTC](https://forums.losant.com/t/post-data-to-google-sheets-particel/1262/3 "2018-11-30T17:09:22Z")

</div>

Thank you Dylan,  
I will look at both options and see if I can figure it out. We do have G Suite so that may be an option. I do have a call into sales as well.

In the meantime, I will just need to keep sending my data to google sheets via webhook on particle then try and decode the JSON on Losant end to get the super pretty display. The amount of data I am saving is too large for the Losant data tables (after 30 days or so).

It’s kind of maddening as I can send my data to losant in a string and view the data perfectly, but can’t send the same string to a webhook to google sheets. But I can send a json string to google but can’t’ decode it on Losant. 😂

I am going to eventually figure this out even if it takes me a whole bottle of Gin. 🙂

I found a post here but failed to implement the JSON decoder. Something off with my Json.

Thank you for taking the time to reply.

> [@\[Solved\] How to manipulate a "string array" in json payload](https://forums.losant.com/t/solved-how-to-manipulate-a-string-array-in-json-payload/564/4):
>
> Good afternoon, I am trying to do a similar thing as the above but I am getting an error on the debug. “InvalidJasonError”. Source did not contain valid JSON: container.jsonString I am using a Particle Electron. My data is structured and published as follows. snprintf(publishStateString, sizeof(publishStateString), "{ \"cf\":\"%.2f\", \"v\":\"%.1f\" }", flow, fuel.getSoC() ); Particle.publish("EF", publishStateString, 60, PRIVATE, NO\_ACK); I am trying the Json decode because I can not sep…
