UseSQL
  • Introduction
  • Getting Started
    • Source Formats
    • Output Formats
    • Managing Keys
    • Sandbox
    • Saved Queries
  • Client Libraries
    • HTML Templating
    • JavaScript Web Client
  • Tutorials
    • Integrate With Your Static Site
    • Share Data In Slack
    • Show external query results in a Google Sheet
    • Query across a Google Sheet and a CSV file
    • Securing Your Key
    • Querying Airtable
    • Integrate With ProcFu
    • Integrate with a private Google Sheet
    • Updating Google Sheets
    • Retrieving data from tables on a web page
    • Displaying reports in Google Sheets from MySQL
    • Querying StackBy Tables
  • Resources
    • Demo Sandbox
    • OpenAPI Docs
    • Redoc API Docs
    • Roadmap
    • Changelog
Powered by GitBook
On this page
  • Step 1: Give A Key Permissions to your sheet
  • Step 2: Give the service account edit permissions to your sheet
  • Step 3: Start inserting your data

Was this helpful?

  1. Tutorials

Updating Google Sheets

PreviousIntegrate with a private Google SheetNextRetrieving data from tables on a web page

Last updated 4 years ago

Was this helpful?

Note: Currently, only inserts are supported so we only can append to existing sheets.

Step 1: Give A Key Permissions to your sheet

Step 2: Give the service account edit permissions to your sheet

After that, the last step is to give UseSQL's service account, googlesheets@usesql.iam.gserviceaccount.com, editor access to your Google Sheet.

Step 3: Start inserting your data

We could append additional categories as shown below.

INSERT INTO "https://docs.google.com/spreadsheets/d/11IYmdNXfaDzdL2mErTqMjE_6NqEqpKxw6YPdXiyCMZ2/edit#gid=337090280" (category) VALUES ('Horror'), ('Sci-Fi'), ('Thriller')

If you had an API key that has access to the following sheet you would be be able to trigger the query that you can view in the demo sandbox below.

After you have done those two things you are ready to query your Google Sheet. UseSQL uses the SQLite query syntax so it may be useful to take a look at their documentation. Below is an example of inserting three values into the category column. So for a Google Sheet like the following.

INSERT
[Sandbox Example]