Pushing data from the photon into google sheets

Have you tried clicking on one of the respective lines to expand the logs for that event?

I did and it was basically a summary of the information sent. Nothing about errors or anything like that. Upon further research it looks like this is related to the endpoint putting those to sleep as discussed here.

Hi I know this is a way long time to ask - but I’ve been using a variation of your code for a presser reading system and it works fine for a timestamp and six columns (A to G) but data sent to a 7th (or more) columns the field is blank for all other than the date. Any ideas on this?

Hi Chris,
I have no ideas but looong time ago I helped a client publish up to 20 columns with this mechanism. So either things changed or you may have a typo somewhere in the webhook or the google spreadsheet.
Good luck!

1 Like

Hi Gustavo, a tricky comma in the snprintf command turned out to be the problem - thank you for replying and advising that you had used this code on 20 columns - I was about to give up.

1 Like

Excellent to hear that is working now and kudos to you that you didn’t!!!

hi, im following gustavo gonnet tutorial, however I got stuck at a step that requires to set up triggers…

I cannot find that option

I i think i found it, is it now here?

Hi Martin,
if you find doPost() there then you are good. I cant say for sure since it’s been years I don’t use this and Google keeps changing their interface (naturally so).
Good luck! Let us know if you found it there…

thanks, with your help I successfully posted data on my spreadsheet, yeii!

Next: Do you know how to publish multiple variables in different columns?
Also: I want to deploy several photons, each reporting their variables, what is the best way to save each photons data into one or several sheets or spreadsheets?
Last: Is there a way to tell either google or the photon to write to a specific row? I want the spreadsheet to have 1000 rows and then start over from the top (or shift every cell down, whichever is simpler), this way I always keep 1000 cells and dont overload the spreadsheet.


1 Like

Hi, Is your setup still running? would you please shere your webhook settings and the google script modifications?
I want to publish to several columns at once. Thanks

I know it is possible, but I do not have the code with me, sorry.

I guess you assign to each photon its own webhook that sends data to its own spreadsheet is one option?

that may be possible from the javascript code that runs in google but I never looked into it.


the form body of the http request that is received in the google side has this shape:


so try “abusing” those 4 fields: name, email, phone, message

Once you have those 4 up and running, you can now rename those fields and perhaps add more.
That would be what I would do today…


EDIT: remember that renaming those fields in the body of the message implies renaming them in the javascript (not sure) and the spreadsheet column names (I;m pretty sure)

1 Like