# Save data to a cloud server

**URL:** <https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076>\
**Category:** Uncategorized\
**Created:** [October 24, 2018, 12:32pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076 "2018-10-24T12:32:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marin10019](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marin10019/32/20484_2.png) [@Marin10019](https://www.thethingsnetwork.org/forum/u/Marin10019)\
**Post date:** [October 24, 2018, 12:32pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/1 "2018-10-24T12:32:08Z")

</div>

Hello there 🙂

I’m getting payloads sent from an Arduino UNO to TTN via a Gateway. I’m looking for a way to save those TTN payloads to a cloud server (AWS, bluemix, …) but I have no clue how to do that. I have been looking on the internet but couldn’t find any relevant answer. I’m entirely new to IoT so any help would be great 😄

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [October 24, 2018, 1:23pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/2 "2018-10-24T13:23:09Z")

</div>

are you looking for a paid service … or just a bit of experimenting for the hobby with no costs.  
do you want to [visualize your data](https://www.thethingsnetwork.org/forum/t/visualize-and-push-your-iot-data/1788) in graphs (maybe also on your phone ?)

easiest way to start is using the TTN-Cayenne integration I think

- [https://www.thethingsnetwork.org/docs/applications/cayenne/](https://www.thethingsnetwork.org/docs/applications/cayenne/)
- [https://hansboksem.wordpress.com/2017/03/06/sending-sensor-data-through-the-things-network-to-cayenne/](https://hansboksem.wordpress.com/2017/03/06/sending-sensor-data-through-the-things-network-to-cayenne/)

but because you wrote :

_no clue how to program_  
_no clue how to do that_  
_couldn’t find any relevant answer_  
_I’m entirely new to IoT_

it won’t be easy then.

- for short term (7 days) you can also use _for free_ the [TTN storage integration](https://www.thethingsnetwork.org/docs/applications/storage/)

---

<div class="post-metadata">

**Author:** ![GryKyo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/grykyo/32/48516_2.png) [@GryKyo](https://www.thethingsnetwork.org/forum/u/GryKyo)\
**Post date:** [October 24, 2018, 3:20pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/3 "2018-10-24T15:20:58Z")

</div>

For logging certain data such as my home alarm system I just dump the data into a Google Drive spreadsheet. I found the easiest way to do it is to:

- Set up a google form
- Use cURL or Node-RED or similar to write to the fields of the form
- Google will mind this for you

Hope this helps  
Garry

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [October 24, 2018, 3:28pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/4 "2018-10-24T15:28:15Z")

</div>

I think we need a bit more info then that Garry … any links to a ‘how to ?’

---

<div class="post-metadata">

**Author:** ![GryKyo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/grykyo/32/48516_2.png) [@GryKyo](https://www.thethingsnetwork.org/forum/u/GryKyo)\
**Post date:** [October 24, 2018, 3:59pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/5 "2018-10-24T15:59:41Z")

</div>

I found a tutorial which I must go dig out to share but not at my own PC today, you’ll have to wait.

Essentially when you use a google form you submit field data which Google then appends to a spreadsheet. By hijacking the URL that the Google form populates with the field data and then doing a HTTP GET request, then to Google Drive it looks like a form response coming in so it stores it.  
I have a Node-Red function node that contains this code where the input message is the variable I want to store. Wired to it’s output is an empty HTTP GET node which submits this any time a new message payload arrives.

msg.url = “[https://docs.google.com/forms/#a\_long\_string\_of\_characters\_pointing\_to\_my\_form\_data/formResponse?entry.#thisI\_is\_the\_field\_ID=](https://docs.google.com/forms/#a_long_string_of_characters_pointing_to_my_form_data/formResponse?entry.#thisI_is_the_field_ID=)”+msg.payload;  
return msg;

#is where your identifiers will be in the msg.url etc.  
Date and timestamp are added as below by Google:  
|22/10/2018 06:03:14|Disarmed OK  
|22/10/2018 09:38:34|Armed OK  
|22/10/2018 10:43:46|Disarmed OK  
|22/10/2018 10:56:07|Armed OK  
|22/10/2018 14:59:42|Disarmed OK  
|22/10/2018 15:23:42|Armed OK  
|22/10/2018 16:16:09|Disarmed OK  
|23/10/2018 01:29:21|Armed OK  
|23/10/2018 06:23:58|Disarmed OK  
|23/10/2018 11:18:31|Armed OK  
|23/10/2018 16:48:44|Disarmed OK

HTH

G

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [October 24, 2018, 4:57pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/6 "2018-10-24T16:57:57Z")

</div>

Garry are you thinking of this SQuix/Eichorn blog post - logging to Google Spreadsheets?

> **[TheThingsNetwork/ LoRaWAN: How to Use Google Spreadsheet to Log data - Squix -...](https://blog.squix.org/2017/07/thethingsnetwork-how-to-use-google-spreadsheet-to-log-data.html)**
>
> In my last post I showed you how to configure the Seeeduino LoRaWAN module to connect to TheThingsNetwork (TTN). But this is only half the rent. You want to do something with the data the node sends, right? This post will show you how you can ......

Main problem I believe is it is insecure as stated:-

“_One word of warning: the current script is not really save {safe- sic}, anyone knowing the URL can send data to your spread sheet. We could improve it by adding an authentication header (in the currently) empty TTN form field and check it in our App script code._”

---

<div class="post-metadata">

**Author:** ![GryKyo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/grykyo/32/48516_2.png) [@GryKyo](https://www.thethingsnetwork.org/forum/u/GryKyo)\
**Post date:** [October 24, 2018, 11:22pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/7 "2018-10-24T23:22:56Z")

</div>

Not this way @Jeff-UK

The way I did this is as follows:

1. Open Google Drive

2. Using the “NEW” button, drill down until you find “New Form” and create and name a new form

3. Now design your form - The text of each question(eg “Sensor 1”) will be the header of each data column in your table

![question](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/b/1/b1122c7b47a48d80b7c2368b9d9070595f3a9c69.jpeg)

1. Select answer type - Your answers should be of the type “Short Answer” (formats a text cell in sheets)

2. For each extra data field click the + button for to add a question and repeat these two steps

3. When done click on the top/right of the page, click the three dots to drop down a contextual menu

![getLink](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/f/6fa3f8b70e4a519a3beb28eb813aa5adbbd7bf11.jpeg)

1. Select “Get pre-filled link” from the list. This will display a sample form with a “Get Link”

2. Put some identifiable text in each answer space like “Data1”, “Data2” etc

3. Click on the “Get Link” button to copy the pre-filled link to your clipboard

4. This is your URL complete with the key to point to your sheets spreadsheet that will collect your results

5. You need to edit this as below. (I have taken my key out and added some text)

[https://docs.google.com/forms/d/e/your\_key\_between\_these-slashes/viewform?usp=pp\_url&entry.1138990543=Data1](https://docs.google.com/forms/d/e/your_key_between_these-slashes/viewform?usp=pp_url&entry.1138990543=Data1)

changes to

[https://docs.google.com/forms/d/e/your\_key\_between\_these-slashes/formResponse?entry.1138990543=Data1](https://docs.google.com/forms/d/e/your_key_between_these-slashes/formResponse?entry.1138990543=Data1)

You can test this by pasting the edited URL into a browser and submitting, you should get an acknowledgement screen if your link is formatted correctly and you should have populated the target spreadsheet with the text “Data1” in the column with the header “Sensor 1”.

Try it and see how you get on? The data will be stored in your Google Drive on a Google Sheets spreadsheet which will have the same filename as you gave to your form in step 2

G

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [October 25, 2018, 12:01am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/8 "2018-10-25T00:01:09Z")

</div>

🤔 I may give that a try at the weekend 😉 thanks

Forumites - if anyone else has success with this and evolves further can they please update post here…

---

<div class="post-metadata">

**Author:** ![Marin10019](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/marin10019/32/20484_2.png) [@Marin10019](https://www.thethingsnetwork.org/forum/u/Marin10019)\
**Post date:** [October 25, 2018, 1:33pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/9 "2018-10-25T13:33:47Z")

</div>

Thank you very much for the answers guys 🙂 I’ll look into them 🙂

---

<div class="post-metadata">

**Author:** ![kalkidanmulu](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@kalkidanmulu](https://www.thethingsnetwork.org/forum/u/kalkidanmulu)\
**Post date:** [December 6, 2018, 6:00am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/10 "2018-12-06T06:00:05Z")

</div>

hey there,  
I am a bit of a rookie in the IOT my self. I have been reading a lot of materials that helped me understand the concept of it but I cant quite figure out how I will be able to deploy it nor find any material that could help me. can you point me in the right direction regarding

if there are any simulation software and tutorials I could practice programming on  
if you could help a beginner in any way please

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [December 6, 2018, 9:24am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/11 "2018-12-06T09:24:13Z")

</div>

Hi,

A possible direction would be to start with **[Arduino](https://www.google.com/search?ei=XeoIXLXwBY200gW0v6aYAg&q=arduino+beginner&oq=arduino+beginner&gs_l=psy-ab.3..0l10.3799.5369..7315...0.0..0.51.416.9......0....1..gws-wiz.......0i71j0i67.jkrEfUOSofo)**. ( 136.000.000 results on google)  
starter books (arduino starter sensor book)

If you have a breadboard, some wire / switches / leds and an Arduino and you have installed the arduino software on your computer you can start programming / experimenting.  
There are starter kits.

This is not the site for seeking help on starting with arduino/programming and learning some basics.

Later you can connect a specific lorawan module and program this in a way that you can transmit sensor data to the things network or use a wifi connection.  
next step would be to do somethimg with that data.

example:

> **[Monitoring Health Station](https://www.hackster.io/dianakhalipina/monitoring-health-station-3941d8)**
>
> Android app-controlled, Arduino-based kit that provides simultaneous data about body t°, heart rate, room humidity and t° data. By Diana Khalipina.

---

<div class="post-metadata">

**Author:** ![kalkidanmulu](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@kalkidanmulu](https://www.thethingsnetwork.org/forum/u/kalkidanmulu)\
**Post date:** [December 7, 2018, 5:42am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/12 "2018-12-07T05:42:52Z")

</div>

thank you for your quick response , I am not entirely new to Arduino programming. I am interested on the point you put as connecting a specific lorawan module and program this in a way you can transmit sensor data to the things network or use wifi connection.  
questions  
are there any simulator software that could replace the module , cos I don’t know where I can find those , I leave in Ethiopia.

---

<div class="post-metadata">

**Author:** ![kalkidanmulu](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@kalkidanmulu](https://www.thethingsnetwork.org/forum/u/kalkidanmulu)\
**Post date:** [December 7, 2018, 5:44am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/13 "2018-12-07T05:44:28Z")

</div>

and if there are any links you could share that could teach me how to transmit data from the sensors to the things network

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [December 7, 2018, 7:52am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/14 "2018-12-07T07:52:03Z")

</div>

I don’t know a simulator software that simulates arduino connected to a lora module and simulates also how a network reacts to a received transmission.

If you are familiar with arduino I suggest build yourself a (single channel) gateway and a node

see **[TTN LABS](https://www.thethingsnetwork.org/labs/)** or use **[search](https://www.thethingsnetwork.org/forum/search?q=node%20arduino%20mini)**

---

<div class="post-metadata">

**Author:** ![kalkidanmulu](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@kalkidanmulu](https://www.thethingsnetwork.org/forum/u/kalkidanmulu)\
**Post date:** [December 7, 2018, 8:34am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/15 "2018-12-07T08:34:27Z")

</div>

I will do as you suggested, thank you for all the help

---

<div class="post-metadata">

**Author:** ![OysterLemur](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/oysterlemur/32/25189_2.png) [@OysterLemur](https://www.thethingsnetwork.org/forum/u/OysterLemur)\
**Post date:** [June 26, 2019, 10:36pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/16 "2019-06-26T22:36:13Z")

</div>

Hi @GryKyo, I was hoping to try your google forms suggestion but the two links provided above are broken. Do you mind re-posting them. Thanks.

> [https://docs.google.com/forms/d/e/your\_key\_between\_these-slashes/viewform?usp=pp\_url&entry.1138990543=Data1](https://docs.google.com/forms/d/e/your_key_between_these-slashes/viewform?usp=pp_url&entry.1138990543=Data1)  
> changes to  
> [https://docs.google.com/forms/d/e/your\_key\_between\_these-slashes/formResponse?entry.1138990543=Data1](https://docs.google.com/forms/d/e/your_key_between_these-slashes/formResponse?entry.1138990543=Data1)

---

<div class="post-metadata">

**Author:** ![blue2monster](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/blue2monster/32/45731_2.png) [@blue2monster](https://www.thethingsnetwork.org/forum/u/blue2monster)\
**Post date:** [November 6, 2019, 7:30pm UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/17 "2019-11-06T19:30:19Z")

</div>

I fixed the broken code of squix with a lot of Squix inspiration:

> **[Uspizig/Ttn-gooogle-script](https://github.com/Uspizig/Ttn-gooogle-script)**
>
> Http integration of google script fir the things network - Uspizig/Ttn-gooogle-script

  
Maybe it helps other.  
Still usnecure but handy for fast development

---

<div class="post-metadata">

**Author:** ![phenopicam](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/phenopicam/32/35697_2.png) [@phenopicam](https://www.thethingsnetwork.org/forum/u/phenopicam)\
**Post date:** [May 6, 2020, 10:23am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/18 "2020-05-06T10:23:22Z")

</div>

Hi GryKyo and you all, and many thanks for your detailed instructions!  
I’m Roberto from Italy and I would like to save back data from Arduino MKR WAN 1300, to a G-spreadsheet for educational porpose, through the TNN platform and HTTP integration.

Therefore, I followed successfully your guidelines and I’m able so far, to submit 2 variable names (AirRH and AirT) through the http-integration and save back them into the google-spreadsheet.

[https://docs.google.com/forms/d/e/my\_key/formResponse?entry.1557039956=AirRH&entry.1427718550=AirT](https://docs.google.com/forms/d/e/my_key/formResponse?entry.1557039956=AirRH&entry.1427718550=AirT)  
AirRH (relative humidity) and AirT (temperature) are also the names of the decoded variables.

Now, my question: how should I configure the http-integration post, in order to send the values and not the variable names AirRH and AirT?

I tested the http integration with pipedream and it works fine:

hardware\_serial:A8610A3432476C18  
metadata {1}  
payload\_fields {2}  
AirRH:48.9  
AirT:20.2  
payload\_raw:MjAuMjB8NDguOTA=

I wonder if I have to use something like payload\_fields{AirRH} in the http integration?  
[https://docs.google.com/forms/d/e/my\_key/formResponse?entry.1557039956=payload\_fields{AirRH}&entry.1427718550=payload\_fields{AirT}](https://docs.google.com/forms/d/e/my_key/formResponse?entry.1557039956=payload_fields%7BAirRH%7D&entry.1427718550=payload_fields%7BAirT%7D)

Any help would be greatly appreciated!

Many thanks

Roberto

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [May 6, 2020, 11:11am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/19 "2020-05-06T11:11:24Z")

</div>

> [@phenopicam](#):
>
> how should I configure the http-integration post, in order to send the values and not the variable names AirRH and AirT?

You can’t; see [How add data field to URL in HTTP Integration?](https://www.thethingsnetwork.org/forum/t/how-add-data-field-to-url-in-http-integration/32452)

To use Google Sheets with the HTTP Integration, without any intermediate server, you’ll need to add [some Google Apps Script code to your spreadsheet](https://github.com/avbentem/libelium-waspmote-lorawan/blob/master/src/google-sheets/README.md), and then enable that as a web app.

---

<div class="post-metadata">

**Author:** ![phenopicam](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/phenopicam/32/35697_2.png) [@phenopicam](https://www.thethingsnetwork.org/forum/u/phenopicam)\
**Post date:** [May 6, 2020, 11:15am UTC](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076/20 "2020-05-06T11:15:50Z")

</div>

Thank you so much for your quick reply!  
I’ll take a look and try the suggested approach.

[Next page](https://www.thethingsnetwork.org/forum/t/save-data-to-a-cloud-server/19076.md?page=2)
