> For the complete documentation index, see [llms.txt](https://kartiktambi.gitbook.io/app-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kartiktambi.gitbook.io/app-docs/quick-guides/google-sheets-as-an-api.md).

# Google Sheets as an API

## Updating Multiple fields at once

The current update block of Google Sheets datasource in Thunkable allows us to update only one field at a time. Working with this block is easy, but certainly not efficient if we want to update multiple fields for a certain row.

Let's have a look at how we can do this efficiently with Google Apps Script & the Thunkable API component.

### Setting up Apps Script on our Spreadsheet

![In the Extensions menu in toolbar, click on Apps Script, which opens a new app script project for this spreadsheet in a new tab.](/files/Wie7zszG0s2jCqJtao8W)

![The new tab opened will look like this, which would have code.gs file opened in our Apps Script project. You can rename your apps script project by clicking the 'Untitled Project' beside the apps script logo.](/files/Md9OmRJuOSHy73dg8XbM)

![](/files/tc3dJAEelzHiXgItYLMq)

![](/files/N9TIPNfYOyolTxbnooHB)

![](/files/MGPdNAJAykH5SkWUBeNM)

![](/files/yF8zOCSrMVZqhHaJxJmF)

![](/files/WXWo9uzQemtlefMAIyQl)
