So it turns out there's a very simple way to use Actions in Adafruit IO to forward data to a google sheets spreadsheet. It's indirect, going from a webhook pointed at a third party, via google forms, with the responses recorded in the sheet. The third party is running the API for free, but it's also on GitHub, so you don't have to trust them (I've forked it for possible future deployment/recreation).
1. Create a new form at https://docs.google.com/forms/
2. Add some questions on the Questions tab, which use the Short Answer (simple values) or paragraph type (multi-line support).
3. On the Responses tab click the Link to Sheet button/link to set the responses to goto a sheet, create a new one or choose existing
4. Publish the form, and click the Chain Link icon (two away from publish) to copy the link to the respondents form (where the data is entered)
5. Goto the third party API, https://restful-google-form.vercel.app/ and enter your form url and submit.
You'll see the form fields (the questions) displayed in JSON, and beneath is a curl command that you can run in your terminal / shell / command-line interface to test sending data to the form.
6. We'll use the URL from that curl command first for our webhook in Adafruit IO automated Actions, so copy it.
7. Goto Actions page of Adafruit IO and create a new Action (Blockly Action if asked): https://io.adafruit.com/
8. Add a trigger block, that fires when any data is received. Point it to a feed that will be receiving regular data.
9. Then add the output block, a publish Webhook block.
Set the URL to the one just copied from the third party site (begins https://restful-google-).
Set the webhook blocks message to match the JSON data portion of the curl command (the section between single quotes after -d). You'll notice the image below shows the message as it stands after step 11.
Set the Feed of the webhook (last drop-down selector) to the feed with the data to publish.
10. Test the Action works. Add some data manually to the Feed that should trigger the Action.
If it didn't then please have a little play with the interface in case it tells you there is a validation issue with your action, but if you still are stuck please get in touch with IO support, via the forums, or feedback button.
We want the Actions to be fool-proof, so your struggle should be noted, and we'd appreciate the heads up!
11. Assuming it works, and some example data was added to your spreadsheet, then you now update the webhook message to use the feed value in the template.
My form has 3 short answer questions, so I've filled out my webhook templated message with this:
{
"entry.1351769664": "{{feed_key}}",
"entry.1707566972": "{{value}}",
"entry.2029449718": "{{feed_name}}"
}
12. Test it, either with patience by waiting for fresh data, or manually add some to the feed to trigger the Action
This page (Forward IO data to google sheets, using google forms (via 3rd party)) was last updated on January 18, 2025.