How RG Forms works
RG Forms automates a proven serverless form pattern — giving you a fully functional HTML contact form in under two minutes, backed entirely by infrastructure you already own in Google Drive.
The problem with contact forms
Most contact form solutions require a paid subscription, a backend server, or hand over your submission data to a third party. Even simple form-handling services add monthly costs and vendor lock-in for something that should be a solved problem.
The DWYL serverless form pattern solves this elegantly: use a Google Apps Script as a free, serverless HTTP endpoint that writes submissions to a Google Sheet and emails you. The catch? Setting it up manually takes 20–30 minutes and involves navigating multiple Google dashboards. RG Forms does it for you in seconds.
Architecture overview
RG Forms is a fully static web app — there is no RG Forms server, no database, and no third-party storage. Every API call is made directly from your browser using your own Google OAuth access token. The resources created belong entirely to you.
Your Browser
│
├─── Google OAuth (sign-in, access token)
│
├─── Google Sheets API ──▶ Creates your spreadsheet
│
├─── Apps Script API ──▶ Creates & deploys your handler
│
└─── (no RG Forms server involved)
Later, when your form is submitted:
Visitor's Browser (or "Try it out" panel)
│
└─── fetch(deploymentUrl, { body: URLSearchParams })
│
└─── Apps Script doPost()
├─── Appends row to Google Sheet
├─── Sends email to you
└─── Returns JSON { result: 'success' }Step-by-step walkthrough
Sign in with Google
You grant RG Forms a temporary OAuth access token. This token lives only in browser memory — it's never sent to any RG Forms server, never written to disk, and is gone the moment you close the tab.
Configure your form
Give your form a name (used as the spreadsheet title), set the email address for submission notifications, and add your fields. Supported types: text, email, textarea, phone, and select/dropdown. You can also customize email notifications with CC/BCC recipients, a custom subject line, sender name, and a dynamic reply-to field (automatically set to the first email field you add).
Google Sheet is created
RG Forms creates a new Google Spreadsheet in your Drive, titled with your form name. A hidden _config tab stores metadata. The first row of the main sheet is pre-populated with your field names as column headers.
Apps Script is created
Using your access token, RG Forms calls the Google Apps Script API to create a new script project bound directly to the spreadsheet. Binding the script to its sheet means it only needs access to that one file — not all your spreadsheets. The script is pre-written — a doPost() handler that maps form data to your sheet columns and sends email notifications, plus a doGet() that returns a simple confirmation page.
Handler code is uploaded
The doPost() function is generated based on your field definitions and uploaded to the Apps Script project. It maps incoming form data to the correct columns in your sheet and sends a formatted HTML email notification — including any CC/BCC addresses, custom subject, sender name, and reply-to field you configured.
Script is deployed as a web app
The Apps Script is deployed as a public web app with execute-as-user permissions. This deployment produces a unique HTTPS URL — the endpoint your form will POST to.
Authorize your script
Because the script was deployed via API rather than the Apps Script editor, Google requires you to authorize it once before it can run. RG Forms shows you an 'Authorize script' button — click it, sign in if prompted, and approve the permissions dialog. The script only requests access to this one spreadsheet (not all your Drive files) and the ability to send email on your behalf. You only need to do this once.
Embed snippet is generated
RG Forms generates a self-contained HTML+JS snippet with your deployment URL baked in. Paste it anywhere in your HTML and the form is live. No additional configuration needed.
What happens when a form is submitted
When a visitor submits your form, their browser sends a POST request directly to your Apps Script deployment URL. Google's servers run your doPost() function, which:
- 1.Reads the column headers from row 1 of your sheet.
- 2.Maps each form field to its matching column.
- 3.Appends a new row with the submission data and a timestamp.
- 4.Sends an HTML email notification (with CC/BCC, custom subject, and reply-to if configured).
- 5.Returns a JSON response — { result: "success" } on success.
The embed snippet posts using URLSearchParams and reads the JSON response to confirm success — showing a success message or an error alert accordingly. The “Try it out” panel works the same way, giving you an accurate preview of what your visitors will experience.
What gets created in your Google Drive
A Google Spreadsheet
Named after your form. Contains a header row matching your fields, and a hidden _config tab with metadata. All submissions are appended as rows.
A Google Apps Script project
Contains the doPost() handler. Bound to its spreadsheet, so it only has access to that one file. You can view and edit it at any time via script.google.com. It runs under your Google account.
Both files are owned by your Google account. RG Forms has no ongoing access to them after provisioning — it only calls the APIs during the one-time setup flow.
Limitations to know about
Email quota
Google Apps Script free accounts are limited to roughly 100 email notifications per day. This is a Google-imposed limit and applies to your personal Apps Script quota.
One-time script authorization required
After provisioning, you must visit the deployment URL once while signed in to Google to authorize the script. This is a Google requirement for scripts deployed via the API. RG Forms walks you through it. When you authorize, Google will show the script requesting access to this one spreadsheet only (not all your spreadsheets) and the ability to send email on your behalf. These permissions are granted to the script running under your own Google account, not to RG Forms.
Apps Script API must be enabled
The Google Apps Script API must be enabled in your Google account as part of the initial setup. If it isn't enabled when you generate a form, RG Forms will let you know and show a direct link to turn it on — it's a single toggle in your Google settings.
No file uploads
The form supports text-based field types only. File inputs are not supported because the Apps Script endpoint handles URL-encoded form data, not multipart uploads.
Basic spam protection only
RG Forms offers an optional honeypot field — a hidden input that bots tend to fill in, causing the submission to be silently discarded by the Apps Script handler. For higher-traffic forms or stronger protection, consider adding reCAPTCHA to your embed HTML manually.