# How can I use the Google Sheets Integration?

**URL:** <https://forum.ideta.io/t/how-can-i-use-the-google-sheets-integration/76>\
**Category:** Tutorials\
**Created:** [December 19, 2021, 8:25pm UTC](https://forum.ideta.io/t/how-can-i-use-the-google-sheets-integration/76 "2021-12-19T20:25:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanis.kerdjana](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yanis.kerdjana](https://forum.ideta.io/u/yanis.kerdjana)\
**Post date:** [December 19, 2021, 8:25pm UTC](https://forum.ideta.io/t/how-can-i-use-the-google-sheets-integration/76/1 "2021-12-19T20:25:30Z")

</div>

I finished the process to activate the Google Integration via Google Login. What should I do know ?

---

<div class="post-metadata">

**Author:** ![Badr](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Badr](https://forum.ideta.io/u/Badr)\
**Post date:** [February 16, 2022, 12:26am UTC](https://forum.ideta.io/t/how-can-i-use-the-google-sheets-integration/76/2 "2022-02-16T00:26:59Z")

</div>

Hello,

We will soon provide a dedicated bubble for the GoogleSheets integration, for now here is the process you need to add data in a Sheet:

Now you finished your integration, check your bot data in data manager (the section encircled in red).

 ![Capture d’écran 2022-02-16 à 00.49.32](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/b6525943cf40ff4f6842ba8c7af86208f5dcd4f2.png)

The underlined tokens are the one you need to use the GoogleSheets API. The refresh\_token allows you to renew your access to the API. The access\_token is the one you will use for HTTP requests.  
We made an API which refresh your access.

To use this API, you would need to get your chatbot credentials, create two bot data in data manager, BotID and BotToken (the spelling does not matter). The value of those data in provided in the settings section, copy them:

 ![Capture d’écran 2022-02-16 à 01.02.38](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/0479d8b34fa7511bbc293726b9fcdca934b490b3.png)

(Secret key is BotToken).

Once you created all this, create an API bubble, and make this request:

 ![Capture d’écran 2022-02-16 à 01.07.08](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/785e609cbefc9dd40ecb505944c14d22967bcb40.png)  
The bot credentials has to be separated by three underscore characters (like this \_\_\_ ).

The access\_token given as a response to the request has to be stored in an object data (conversation data)  
 ![Capture d’écran 2022-02-16 à 01.13.48](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/c1c35e4474d9b6f9b2e78c555cdbb38d1e6f3084.png)

 ![Capture d’écran 2022-02-16 à 01.11.16](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/80d9f4b78d67ad152308d5afe1f89286aa106044.png)

You now have the process to renew your access to the GoogleSheets API during a conversation on an Ideta chatbot.

 ![Capture d’écran 2022-02-16 à 01.16.26](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/903d6aa860cacc12756e658ca234866d53cd8ad5.png)

This request is provided by Google to add data in a Sheets, the gs\_id is the id of your sheet, you can find the gs\_id you want in the GoogleSheets website:

 ![Capture d’écran 2022-02-16 à 01.19.21](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/5c82d76c8401b4beeee666876d56a008e51b9c74.png)

The body is in JSON, the value key is easy to understand, the first list is divided in rows ( each row is a list of strings ). Lists in JSON are : [LIST].

For further understanding, here is the Google full documentation link: [Method: spreadsheets.values.append &nbsp;|&nbsp; Sheets API &nbsp;|&nbsp; Google Developers](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)

Thank you for your attention.
