Updating Google Sheets
Last updated
Last updated
Note: Currently, only inserts are supported so we only can append to existing sheets.
After that, the last step is to give UseSQL's service account, googlesheets@usesql.iam.gserviceaccount.com
, editor access to your Google Sheet.
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 INSERT documentation. Below is an example of inserting three values into the category column. So for a Google Sheet like the following.
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.