> For the complete documentation index, see [llms.txt](https://docs.locoia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.locoia.com/connectors/connectors/google-sheets.md).

# Google Sheets

Use Google Sheets to create and edit online spreadsheets.

## Actions

### Add Rows

The Add Rows actions requires an exact range to be provided, i.e. the number of rows that are being inserted must match the number of rows in the range field.

In order to achieve this dynamically, the number of rows can be calculated right in the range field, with `{{ row | length + 1 }}` (assuming the first row are used for the headers, thus 1 rows needs to be added to the length).

![](https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FDvlMBTb0KjlMYvJvUDoy%2Fimage.png?alt=media\&token=e7146f0e-558d-42e4-a1ec-b9470d57bc35)

## Troubleshooting Errors

Some errors Google Sheets returns are unfortunately not straight forward to understand and troubleshoot. Here is an overview over some common errors and the possible reasons for it.

| Error message                             | Possible reasons                                                                                                                                                 |
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Unable to parse range: *SheetTitle:Range* | <ul><li>The <em>SheetTitle</em> does not exist in the Spreadsheet</li><li>The range does not match the number of rows/columns specified in the request</li></ul> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.locoia.com/connectors/connectors/google-sheets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
