Tools / Form to Sheet Bridge

Form to Sheet Bridge

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.

Fields

Setup, once

1. Create a Google Sheet and copy its ID from the URL (the long part between /d/ and /edit).
2. In the sheet: Extensions → Apps Script, paste the script, replace PASTE_SPREADSHEET_ID, save.
3. Deploy → New deployment → type: Web app → access: Anyone → copy the web app URL.
4. In the form code, replace PASTE_YOUR_WEB_APP_URL with that URL.

1. Apps Script - paste into the sheet

2. Form - embed anywhere

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

Form to Sheet Bridge

See it at work

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

Form to Sheet Bridge
Fields
API
CLI
title
fields
sheet_name
success_message
hiringsai tool form-to-sheet-bridge
title string
fields array
sheet_name string
success_message string
4 fields, 2 required
curl -X POST https://hiringsai.com/api/v1/tools/form-to-sheet-bridge/run
-d '{"input": {"title": "<text>", "fields": "<text>"}}'
JSON result
hiringsai run form-to-sheet-bridge --input '{"title": "<text>", "fields": "<text>"}'
also callable over MCP
JSON result printed
Free toolAPI and MCPNo account
Fields
titlestring
fieldsarray
sheet_namestring
success_messagestring
Ways to use it
pagethis app
APIPOST .../run
CLIhiringsai run
MCPtools/call
API call
POST /api/v1/tools/form-to-sheet-bridge/run
input: {"title": "<text>", "fields": "<text>"}
JSON result back
Command line
hiringsai run form-to-sheet-bridge
--input <json>
JSON result printed
The Form to Sheet Bridge page as it opens
Form to Sheet Bridge4 fields
The page as it opens, captured from the live site.
The Form to Sheet Bridge app at phone width
Form to Sheet Bridgephone layout
The same app at phone width.
A desktop computer on a white desk with a lamp
Form to Sheet BridgeFree tool
Generate a form plus the Google Apps Script that appends every submission as a row in your spreadsheet.
A woman working at a desktop monitor
Form to Sheet BridgeAPI and MCP
Call it from a script over the API or MCP.