3

I was wondering, as a thought experiment, if it were possible to use Google Spreadsheets to post to a web service.

For example imagine you created a spreadsheet for guests attending a party with columns - first name, last name, allergies, meal preferences since it is so easy to share and sync you send a link to it to everyone you can think of. But being a geek you would like the data to populate a MySQL server (or whatever) so you can create a fancy website or reminder or social thingy (or whatever).

Is this possible? I have tried reading the API but it does not appear to be but maybe I have missed something.

1 Answer 1

2

Yes, populating an external service should be possible in a few different ways, all involving Google Apps Scripts:

  1. By using the JDBC service to populate an external database directly
  2. By using the URLFetch service to call an external web service
  3. By pulling data from the spreadsheet from an external app

In any case, you would need to set up a trigger script that will run when a response is submitted to your spreadsheet.

Option 1 might be out of the question if your database is behind a firewall. If you're not keen on doing a lot of Google Apps scripting, a good compromise could be to have a small trigger script ping an external web service to notify it of the new data. The external service would then poll the Google Spreadsheet for data, using for example the XML API.

You say it's just a thought experiment for now (too bad - it sounds like a fun project), but in any case I would really recommend reading up on Google Apps Script. It is a fairly new feature in Google Docs/Drive, and really makes it possible to create quite powerful webapps.

3
  • Nice answer! I have been mulling over this in my head for months now - I just had that itch that "I should be able to do this". Thanks. Have you tried this before or known anyone who has?
    – Peter
    Oct 14, 2012 at 21:33
  • I have been doing stuff with triggers, and have played with URLFetch, but I haven't done exatcly what you're trying to accomplish. But as I said, it sounds like a cool thing to do! Oct 15, 2012 at 8:07
  • Oh, and again: You really should look into Google Apps Script. That has helped me scratch a lot of itches. Oct 15, 2012 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.