A laptop, a phone and a hand writing in a notebook on a wooden desk, banner image on the Form to Sheet Bridge page

Herramientas / Automate suite

Form to Sheet Bridge

Generate a form plus the Google Apps Script that appends every submission as a row in your Google Sheet.

Define the fields you want to collect and get two things that belong together: an embeddable form, and the tiny Apps Script that lands each submission as a row in your own Google Sheet - no per-submission pricing, no third party holding your leads.

Open the tool
Screenshot of the Form to Sheet Bridge tool

What it does

Your form, your sheet, no middleman.

Both halves, consistent

The form field names and the script's columns generate from the same list, so nothing silently drops a field.

Runs on Google's free tier

The Apps Script web app is free with a Google account. You own the sheet, the script and the data.

Headers created for you

The script writes the header row on first submission, with a timestamp column added.

CORS-safe by design

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.

Both halves, one build

The embeddable form and the Apps Script are generated together from the same field list.

Headers write themselves

The script creates the header row on first run: timestamp, then your fields in order.

Formula injection blocked

Text starting with =, +, - or @ is quoted before it lands, so a submission cannot run as a formula.

No CORS dance

The form posts as plain text on purpose, skipping the preflight Apps Script cannot answer.

Zeros survive

The cleaner keeps 0 and false as values instead of blanking them.

Edit the list live

Add fields, mark required, remove mistakes (one must stay); both snippets rebuild on every change.

How it works

Fields in, two snippets out.

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

Is it really free?

The Apps Script web app runs on Google's free quota, generous for lead-volume forms. Your Google account is the only account.

Where does the data live?

In your Google Sheet and nowhere else - the form talks to your script, which writes to your sheet.

Spam?

Add a honeypot field or switch the web app to require sign-in; the script marks where.

Where is the sheet ID?

In the sheet's URL - the long part between /d/ and /edit. Paste it over PASTE_SPREADSHEET_ID.

Why Apps Script?

It runs inside your sheet, so submissions land where you already work, on the free tier, with no server to run.

What does the setup cost?

Four steps once: make a sheet, paste the script, deploy as a web app, paste the URL into the form.

Required fields enforced?

Yes - marked fields carry the required attribute in the form and show a star.

Open Form to Sheet Bridge

Worked example

Real output, from the tool itself.

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);
}
Try it with your own input

More in the Automate suite

Image Batch ResizerCron Schedule BuilderInventory Reorder CalculatorSupport Ticket TriageChangelog Digest Maker
A laptop, headphones, a camera, a phone and a plant on a white desk, seen from above, banner image on the Form to Sheet Bridge page

Try it now.

Form to Sheet Bridge runs in your browser. No account needed.

Input To Output

Fields in, two snippets out

Field nameTypeRequired ornotApps Scriptfor the sheetForm HTML witha send scriptSetup stepsForm to SheetBridgeInOut
InField nameTypeRequired or notForm to SheetBridgeApps Script for the sheetForm HTML with a send scriptSetup stepsOut
A field list becomes a Google Apps Script and an embeddable form.

Pipeline

Setup, once

Create a sheet andcopy its ID fromthe URLPaste the scriptin Extensions,Apps ScriptDeploy as a Webapp open to AnyonePut the web appURL in the formcode
Create a sheet and copy its IDfrom the URLPaste the script in Extensions,Apps ScriptDeploy as a Web app open to AnyonePut the web app URL in the formcode
Four steps on your side.

Pipeline

What happens on submit

Visitor fills theformBrowser sends theanswers as JSONScript reads theJSONValues are cleanedOne row isappended
Visitor fills the formBrowser sends the answers as JSONScript reads the JSONValues are cleanedOne row is appended
From a visitor to a new row.

Before After

Fields to sheet columns

Field listHeader rownameemailmessagetimestampnameemailmessage
Field list to Header rownametimestampemailnamemessageemailmessage
The starter fields and the header row they make.

Support Matrix

Field type to form control

inputtextareastep anybrowseremail checkdate pickertextemailnumberdatetextarea
textinputemailinputbrowser email checknumberinputstep anydateinputdate pickertextareatextarea
Five types, five controls.

Before After

Formula guard

TypedStored=SUM(A1:A9)+1 555 0100@bosshello'=SUM(A1:A9)'+1 555 0100'@bosshello
Typed to Stored=SUM(A1:A9)'=SUM(A1:A9)+1 555 0100'+1 555 0100@boss'@bosshellohello
Text that starts with = + - or @ gets a leading quote so the sheet does not run it.

Before After

Plain numbers pass through

TypedStored42-12.5+3.542-12.5+3.5
Typed to Stored4242-12.5-12.5+3.5+3.5
Number-like text is not quoted.

Before After

Field name rules

TypedResultEmpresajob title9livesemail (again)company, addedRejected: letters, numbers,underscoresRejected: must start with aletterRejected: already exists
Typed to ResultEmpresacompany, addedjob titleRejected: letters, numbers,underscores9livesRejected: must start with a letteremail (again)Rejected: already exists
Names are lower-cased and checked.

Before After

Required fields

FieldForm showsname, requiredemail, requiredmessage, optionalname * with requiredemail * with requiredmessage with no required
Field to Form showsname, requiredname * with requiredemail, requiredemail * with requiredmessage, optionalmessage with no required
A star in the label and the required attribute.

Support Matrix

Starter fields and attributes

requiredtextareaemail typestar in labelnameemailmessage
namerequiredstar in labelemailrequiredemail typestar in labelmessagetextarea
What each starter field gets.

Before After

Adding a company field

StarterAfter adding company['timestamp','name','email','message']clean(d['name']),clean(d['email']),clean(d['message'])['timestamp','name','email','message','company']... , clean(d['company'])
Starter to After adding company['timestamp','name','email','message']['timestamp','name','email','message','company']clean(d['name']), clean(d['email']),clean(d['message'])... , clean(d['company'])
The header line and the values line both grow.

Pipeline

Header row, once

Open the sheet byits IDIs the last rowzero?If yes, write theheaderAppend the new row
Open the sheet by its IDIs the last row zero?If yes, write the headerAppend the new row
The script writes the header only when the sheet is empty.

Before After

Submissions to rows

JSON sentRow appended{"name":"Sam","email":"sam@example.com","message":"=1+1"}{"name":"Ana","email":"ana@example.com","message":"Hello"}[date and time, Sam,sam@example.com, '=1+1][date and time, Ana,ana@example.com, Hello]
JSON sent to Row appended{"name":"Sam","email":"sam@example.com","message":"=1+1"}[date and time, Sam,sam@example.com, '=1+1]{"name":"Ana","email":"ana@example.com","message":"Hello"}[date and time, Ana,ana@example.com, Hello]
Each JSON post appends one row.

Pipeline

Why text/plain

A JSON contenttype triggers apreflightThe web app cannotanswer itSend as text/plaininsteadThe script parsesthe JSON itself
A JSON content type triggers apreflightThe web app cannot answer itSend as text/plain insteadThe script parses the JSON itself
Apps Script web apps cannot answer a preflight check.

Before After

Status line

ResultShownResponse okResponse not okThanks - received.Something went wrong, pleasetry again.
Result to ShownResponse okThanks - received.Response not okSomething went wrong, please tryagain.
Two messages after sending.

Input To Output

Placeholders you replace

PASTE_SPREADSHEET_IDin the scriptPASTE_YOUR_WEB_APP_URLin the formSheet ID fromthe URLbetween /d/and /editThe web appURL from thedeploymentYour valuesInOut
InPASTE_SPREADSHEET_ID in the scriptPASTE_YOUR_WEB_APP_URL in the formYour valuesSheet ID from the URL between /d/and /editThe web app URL from thedeploymentOut
Two values only you have.

Real Timeline

Setup order

Copy thesheet ID1 stepPaste thescript2 stepDeploy asWeb app3 stepPaste theURL in theform4 step
1Copy the sheet ID1 step2Paste the script2 step3Deploy as Web app3 step4Paste the URL in the form4 step
The four steps in sequence.

Real Timeline

The row built per submission

timestamp1 columnname2 columnemail3 columnmessage4 column
1timestamp1 column2name2 column3email3 column4message4 column
Column order in each appended row.

Before After

Input or textarea

FieldForm codemessage, textareaemail, email<textarea name='message'rows='4'><input type='email'name='email'>
Field to Form codemessage, textarea<textarea name='message' rows='4'>email, email<input type='email' name='email'>
Two shapes of field in the form code.

Before After

A field and a setting

You setResultamount, numberAccess: Anyone<input type='number'step='any' name='amount'>Anyone with the URL can senda row to your sheet
You set to Resultamount, number<input type='number' step='any'name='amount'>Access: AnyoneAnyone with the URL can send a rowto your sheet
What you choose and what it does.

Before After

Messages when adding a field

ActionMessageEmpty or odd nameSame name twiceRemoving the last fieldField names: lowercaseletters, numbers,underscores; start with aletter.That field already exists.Keep at least one field.
Action to MessageEmpty or odd nameField names: lowercase letters, numbers,underscores; start with a letter.Same name twiceThat field already exists.Removing the last fieldKeep at least one field.
What the page says.

Input To Output

Copy buttons

The scriptThe formScript on theclipboardForm on theclipboardCopyInOut
InThe scriptThe formCopyScript on the clipboardForm on the clipboardOut
Two buttons, one per snippet.

Support Matrix

Where each placeholder comes from and goes

Your sheet URLScript codeYourdeploymentForm codePASTE_SPREADSHEET_IDPASTE_YOUR_WEB_APP_URL
PASTE_SPREADSHEET_IDYour sheet URLScript codePASTE_YOUR_WEB_APP_URLYour deploymentForm code
Two values, four places.

Real Timeline

Inside doPost

Open thesheet by ID1 stepWrite headerif empty2 stepParse theJSON3 stepClean eachvalue4 stepAppend therow5 stepReply ok6 step
1Open the sheet by ID1 step2Write header if empty2 step3Parse the JSON3 step4Clean each value4 step5Append the row5 step6Reply ok6 step
The order of the script lines.

Before After

The reply and the message

ResultVisitor seesScript replies {"ok":true}Network or script errorForm shows Thanks -received.Form shows Something wentwrong, please try again.
Result to Visitor seesScript replies {"ok":true}Form shows Thanks - received.Network or script errorForm shows Something went wrong,please try again.
The script answers with JSON and the form reads the status.

Before After

Field list table

Starter fieldTable rowname, text, requiredemail, email, requiredmessage, textarea, optionalRow with removeRow with removeRow with remove
Starter field to Table rowname, text, requiredRow with removeemail, email, requiredRow with removemessage, textarea, optionalRow with remove
The page lists fields with a remove button each.

Authored Tiles

Good to know

The page builds thesnippets in your browserAnswers go to your ownsheetAnyone with the web appURL can post to itNo account on this site
The page builds the snippets in yourbrowserAnswers go to your own sheetAnyone with the web app URL can postto itNo account on this site
Four plain facts.