Skip to main content

How to read data from different Google Sheets

tip
To enable integration, you can also use the ready-made Google Sheets integration block.

The bot will help you determine the exact sheet of Google Sheets to be read.

First, add the text to $var block.

The sheet name will be saved to the $page variable:

Connect the Transition after entering a $page branch to the HTTP request block:

Design the HTTP request according to your needs.

In the HTTP request URL, replace the sheet=<sheet_name> part with sheet=${page}. This way, you are inserting the sheet’s name in the URL itself, which was entered earlier.

Here is an example of what the path might look like:

https://tools.ds.tovie.ai/api/googlesheet2json?sheet=${page}&id=1GaCjqsFRk7ZItwIiPzGaYuG04wU9qrzdvMWnm4cxvMI

Now you can display the data as usual according to the selected case. As a result, you will be able to read data from any sheet of your spreadsheet.