Generate a form plus the Google Apps Script that appends every submission as a row in your Google Sheet.
Build the field list; both snippets update live.
What it does
The form field names and the script's columns generate from the same list, so nothing silently drops a field.
The Apps Script web app is free with a Google account. You own the sheet, the script and the data.
The script writes the header row on first submission, with a timestamp column added.
The form posts as plain text so the browser skips the preflight that breaks most hand-rolled Apps Script forms - the setup notes explain why.
The embeddable form and the Apps Script are generated together from the same field list.
The script creates the header row on first run: timestamp, then your fields in order.
Text starting with =, +, - or @ is quoted before it lands, so a submission cannot run as a formula.
The form posts as plain text on purpose, skipping the preflight Apps Script cannot answer.
The cleaner keeps 0 and false as values instead of blanking them.
Add fields, mark required, remove mistakes (one must stay); both snippets rebuild on every change.
How it works
Step 1
Add the fields you want to collect.
Step 2
Paste the script into your sheet's Apps Script and deploy it as a web app.
Step 3
Paste your web app URL into the form and embed it anywhere.
FAQ
The Apps Script web app runs on Google's free quota, generous for lead-volume forms. Your Google account is the only account.
In your Google Sheet and nowhere else - the form talks to your script, which writes to your sheet.
Add a honeypot field or switch the web app to require sign-in; the script marks where.
In the sheet's URL - the long part between /d/ and /edit. Paste it over PASTE_SPREADSHEET_ID.
It runs inside your sheet, so submissions land where you already work, on the free tier, with no server to run.
Four steps once: make a sheet, paste the script, deploy as a web app, paste the URL into the form.
Yes - marked fields carry the required attribute in the form and show a star.
Worked example
This is what Form to Sheet Bridge returned for the example input shown, captured from the tool itself - not a mockup.
You enter
Built-in fields
name (text, required), email (email, required), message (textarea)
Fields added in this example
company (text, required), work_email (email, required), team_size (number)
The tool returns
Generated form HTML
<form id='lead-form'>
<!-- replace PASTE_YOUR_WEB_APP_URL below -->
<label>name *<br><input type='text' name='name' required></label><br>
<label>email *<br><input type='email' name='email' required></label><br>
<label>message<br><textarea name='message' rows='4'></textarea></label><br>
<label>company *<br><input type='text' name='company' required></label><br>
<label>work_email *<br><input type='email' name='work_email' required></label><br>
<label>team_size<br><input type='number' name='team_size'></label><br>
<button type='submit'>Send</button>
<p id='lead-status'></p>
</form>
<script>
document.getElementById('lead-form').addEventListener('submit', async function(ev){
ev.preventDefault();
var data = {};
new FormData(ev.target).forEach(function(v,k){ data[k]=v; });
// text/plain avoids the CORS preflight Apps Script web apps cannot answer
var r = await fetch('PASTE_YOUR_WEB_APP_URL', {method:'POST', headers:{'Content-Type':'text/plain'}, body:JSON.stringify(data)});
document.getElementById('lead-status').textContent = r.ok ? 'Thanks - received.' : 'Something went wrong, please try again.';
});
</script>
Generated Google Apps Script
function doPost(e){
var sh = SpreadsheetApp.openById('PASTE_SPREADSHEET_ID').getSheets()[0];
var HEADERS = ['timestamp','name','email','message','company','work_email','team_size'];
if (sh.getLastRow() === 0) { sh.appendRow(HEADERS); }
var d = JSON.parse(e.postData.contents);
sh.appendRow([new Date(), d['name']||'', d['email']||'', d['message']||'', d['company']||'', d['work_email']||'', d['team_size']||'']);
return ContentService.createTextOutput(JSON.stringify({ok:true}))
.setMimeType(ContentService.MimeType.JSON);
}
Form to Sheet Bridge
Generate a form plus the Google Apps Script that appends every submission as a row in your spreadsheet.



