Hi Folks, A quick guide to upload your data to google drive, might help someone out!!!! And just to say thanks for all the help I have recieved here over the last while.
Just a quick tutorial to add data to google sheets,(same as a csv). It is a quick and easy way to store and log data, with google products mobile apps, dashboards and analytics can be formed quickly.
Assuming you have a gmail/google account.
Go into ‘my Drive’ Open www.google.com, select the squares up in the corner. Go to ‘my Drive’.
While in ‘my Drive’, Click on ‘new’, then select ‘forms’., a new sheet will open.
In this create a new field, name it as required. Make sure to select the answer as ‘Text’.
Do this again, so we have two fields, Temp 1 and Temp 2.
Now for the link part, this will connect our node-red to google sheets, which we can look at on ‘my Drive’, which can be shared printed or download.
Click, Responses, then ‘Choose Response Destination’ (This is where you create a spreadsheet on Google Drive)
After this, press create.
After this click ‘Responses’ again then ‘Get pre-filled URL’. (This will give us a link to the web page)
Our url will look like this;
https://docs.google.com/forms/d/1GYxYrONESHz-SM9nSSmQjlZi_M-1gN6GknU22S1jdj4/viewform?entry.632411608=25&entry.861197105=10
Three things to change here ‘viewform’ changes to ‘formResponse’
And the two values can be changed to a payload of your choice, i.e. payload.temp1
The blue part will be different for everyone, unique to your drive.
The values in green are references to the cells.
Your new line should look like;
https://docs.google.com/forms/d/1GYxYrONESHz-SM9nSSmQjlZi_M-1gN6GknU22S1jdj4/formResponse?entry.632411608={{payload.temp1}}&entry.861197105={{payload.temp2}}
Post this into a http node.
Insert the URL. Your payload will start streaming to the file you created on ‘my Drive’. Or else on the form tab you were working with, will have a button called ‘view responses’.
Any Questions dont be afraid to ask.
This might help someone out!!!!!
Regards
John.msg.payload : Object{ "humidity": "17.7", "temp": "55.5", "ambientTemp": "63.7" }
https://docs.google.com/forms/d/<myid>/formResponse?entry.1775274334={{payload.temp}}&entry.581921689={{payload.humidity}}
--
http://nodered.org
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/IO3I0PI_u2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Personally if you're happy with function nodes which it appears you are. Use + to join rather than a separate node using moustache.
Eg msg.url="https://docs.google.com/forms/d/<myid>/formResponse?entry.1775274334="+msg.payload.temp+"&entry.581921689="+msg.payload.humidity;
Then join this function node to a Dubug node that you can configure to display msg.url and it should be fairly easy to see where it is going wrong.
Sorry, try this: [{”id”:”f09fa129.0f606”,”type”:”function”,”z”:”e52918a2.1ad6e8”,”name”:”Construct URL”,”func”:”msg.url = \”https://docs.google.com/forms/d/<MYID>/formResponse?entry.1775274334=\”+msg.payload.temp+\”&entry.581921689=\”+msg.payload.humidity;\nreturn msg;\n”,”outputs”:1,”noerr”:0,”x”:470,”y”:374,”wires”:[[”e3e2740c.1c1d88”,”ee29b041.11d65”]]},{”id”:”ee29b041.11d65”,”type”:”http request”,”z”:”e52918a2.1ad6e8”,”name”:””,”method”:”GET”,”ret”:”txt”,”url”:””,”x”:661,”y”:258,”wires”:[[”e3e2740c.1c1d88”]]},{”id”:”e3e2740c.1c1d88”,”type”:”debug”,”z”:”e52918a2.1ad6e8”,”name”:””,”active”:true,”console”:”false”,”complete”:”true”,”x”:735,”y”:400,”wires”:[]},{”id”:”7499832b.8b667c”,”type”:”inject”,”z”:”e52918a2.1ad6e8”,”name”:””,”topic”:””,”payload”:”{'temp': 65, 'humidity'=35}”,”payloadType”:”none”,”repeat”:””,”crontab”:””,”once”:false,”x”:134,”y”:155,”wires”:[[”a7061764.58f9e8”]]},{”id”:”a7061764.58f9e8”,”type”:”function”,”z”:”e52918a2.1ad6e8”,”name”:”Generate JSON”,”func”:”msg.payload = {temp: 65, humidity: 40};\nreturn msg;”,”outputs”:1,”noerr”:0,”x”:346,”y”:279,”wires”:[[”f09fa129.0f606”]]}]
|
I used a http request node to send the data through to google sheets. Your flow is not importing correctly for me for some reason.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
--
http://nodered.org
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/IO3I0PI_u2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
--
http://nodered.org
** We're moving this mailing list over to the new Node-RED Forum: https://discourse.nodered.org **
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/IO3I0PI_u2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/cfd98210-e8ca-4191-951e-c91a564db719%40googlegroups.com.