Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sheetforms.co

An open API to save your forms data to a Google Spreadsheet.

How to use?

Make a POST request to https://sheetforms.co/api like this:

async function handleSubmit() {
  await fetch("https://sheetforms.co/api", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      spreadsheetId: "YOUR_SPREADSHEET_ID",
      values: ["ADD", "SOME", "DATA", "HERE"],
    }),
  });
}

And remember to set sheetforms.co as Editor in your spreadsheet sharing options.

# sheetforms.co client email
sheetforms@sheetforms.iam.gserviceaccount.com

🥳 That's it.

Example

Visit sheetforms.co for a live example.

API

The API takes a POST request with the following body:

  • spreadsheetId: The ID of the spreadsheet to save the data to.
  • values: An array of values to save to the spreadsheet.
  • range: (optional) The range to save the data to.

Deploy your own

This repository contains a Gatsby site and a serverless function (to communicate with the Google Sheets API), both hosted on Vercel.

Use the button below to easily deploy a copy to Vercel, and configure with your own GOOGLE_CLIENT_EMAIL, GOOGLE_PRIVATE_KEY and an optional SPREADSHEET_ID environment variables.

Deploy with Vercel

About

An open API to save your forms data to a Google Spreadsheet. Powered by Vercel serverless functions.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages