]>
| description | A simple comment system that uses Google Forms and Google Sheets as its backend. |
| last change | Wed, 22 Apr 2026 06:42:39 +0000 (23:42 -0700) |
| URL | https://git.ardis.lu/google-forms-comments.git |
| ssh://git@git.ardis.lu/~/google-forms-comments.git | |
| git@git.ardis.lu:google-forms-comments.git |
A simple comment system that uses Google Forms and Google Sheets as its backend.
Code repository mirrors: GitHub, Codeberg, git.ardis.lu
To create new comments, the frontend directly POSTs to the Google Form. Since
the POST is cross-origin, it is sent in no-cors mode and the response is
opaque. The frontend assumes all POSTs are successful. If the POST is
blocked by Google Forms for any reason (e.g. if Google suspects the end-user is
a bot and does a CAPTCHA challenge), then the comment will be silently dropped.
The /functions/comments.js file is a
Cloudflare Worker that acts as a proxy to
access the Google Sheets API. The Cloudflare Worker injects a service account's
credentials to the API request because the Google Sheets API requires
authorization for all requests, even requests to public spreadsheets.
Use the wrangler CLI to serve the static frontend and the Cloudflare Worker
proxy at the same time.
Copy .dev.vars.example and rename the copy to .dev.vars. Provide an email
and private key for a service account with access to the Google Sheet that
has the form responses.
npx wrangler pages dev .
| 5 months ago | main | shortlog | log | tree |