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, [email protected], editor access to your Google Sheet.
Step 3: Start inserting your data
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.