Guides
  • Introduction to Sheet Monkey
  • Guides
    • Sending data to Google Sheets using HTML
    • Sending data to Google Sheets with vanilla Javascript
    • Submitting Webflow forms to Google Sheets
    • Submitting Carrd forms to Google Sheets
    • Special Fields
    • File uploads
    • Spam Protection
    • Notifications
    • Advanced workflows
    • Form Builder
      • Embedding forms in Webflow
  • Examples
    • Mailing Lists
    • Opt-In Forms
    • Surveys
    • Customer Support
  • Policies
    • What permissions are required to use Sheet Monkey
    • Privacy Policy
    • Terms & Conditions
  • ← Back to Sheet Monkey
Powered by GitBook
On this page
  • Picking a Google Sheet
  • The form action is the link to your Google Sheet
  • Mapping the form fields to your sheet columns
  • Special form fields
  • Redirecting after the form is submitted
  • Limiting what websites can submit to your form

Was this helpful?

  1. Guides

Sending data to Google Sheets using HTML

A simple guide to building a HTML form and sending the data to Google Sheets with Sheet Monkey

PreviousIntroduction to Sheet MonkeyNextSending data to Google Sheets with vanilla Javascript

Last updated 4 years ago

Was this helpful?

All these guides require that you have a If you haven't registered your account, please do that before continuing.

Picking a Google Sheet

Because Sheet Monkey automatically builds the columns, it may be easiest to start with a blank sheet if you already have a form and just want to connect it to a sheet. But if you're looking for something to help you get started, you can pick one of our templates. Sheet Monkey will automatically save the sheet with some initial columns in your Google Drive.

The form action is the link to your Google Sheet

Once you create a form, Sheet Monkey will provide a form url or "form action" where you can start posting data. This unique action is all you need to post data into the Google Sheet.

Because form actions function like a one-way write key to your Google Sheet, we recommend that you only post them on your site when you're ready for data to start coming into the sheet. If you need to disable saving data into your sheet, you must delete the form in Sheet Monkey.

Mapping the form fields to your sheet columns

Here's an example mailing list form that Sheet Monkey built:

<form action="https://api.sheetmonkey.io/form/vB1pUYCBvUqnSarEvAgsd6" method="post">
  <label>Your Name: <input type="text" name="Name" required /></label>
  <label>Your Email: <input type="email" name="Email" required /></label>
  <input type="hidden" name="Created" value="x-sheetmonkey-current-date-time" />
  <input type="submit" value="Sign Up" />
</form>

Once you submit this form, the data will appear in the linked sheet like this:

Special form fields

Saving a current date and time:

Create a hidden field with a value of x-sheetmonkey-current-date-time and Sheet Monkey will automatically convert that value to a date and time in your Google Sheet.

<input type="hidden" name="Created" value="x-sheetmonkey-current-date-time" />

Saving a current date:

Create a hidden field with a value of x-sheetmonkey-current-date and Sheet Monkey will automatically convert that value to a date in your Google Sheet.

Redirecting after the form is submitted

Once a visitor to your website has successfully submitted a form, you often want to redirect them to another location. Sheet Monkey allows you to do this with the x-sheetmonkey-redirect field. Put any URL into this field and the user will be automatically redirected to that URL after submitting your form.

<input 
    type="hidden" 
    name="x-sheetmonkey-redirect" 
    value="https://my-site.com/signup-success.html" 
/>

This special reserved field will not be added to your spreadsheet as a column.

Limiting what websites can submit to your form

Sheet Monkey allows you to limit the domains that can submit to your form with the "Domains" field. If you want to allow submissions from all locations leave this field blank or enter the * wildcard character.

Always follow the and mapping the form fields to the columns. If you picked one of our templates, Sheet Monkey provides some starter HTML for your form. Feel free to modify this HTML as much as you want.

Sheet Monkey has a few that make saving certain common types of data easier.

Three Rules of Sheet Monkey when building your HTML form
"special fields"
free Sheet Monkey account.
Example submission for the above form