Home / All Integrations / Google Sheets

Connect Google Sheets to your chatbot

Manage data in Google Sheets

Save and access data in a Google Sheets table.


To authenticate this app, please refer to this documentation: https://cloud.google.com/docs/authentication/production and create a Service Account to interact with Google Sheets.
You can also refer to this documentation for a step-by-step walkthrough on how to retrieve the right credentials.

You will also need a spreadsheet_id that you can pass as an argument to the Fn call or as an optional environment variable.
The spreadsheet ID can be found in the URL of your spreadsheet: for example,
in https://docs.google.com/spreadsheets/d/1R_uHoL3PmS3pAa5ujG2aARbw9REIjORXiZDGigQoLoA/edit#gid=0, the spreadsheet ID is


  • Fn("google/sheets", method="setHeaderRow", values=["firstname", "lastname"]): set the header row for the table
  • Fn("google/sheets", method="addRow", row={"firstname": "John", "lastname": "Smith"}): add a row in the sheet
  • Fn("google/sheets", method="addRows", rows=[{"firstname": "John", "lastname": "Smith"}, {"firstname": "Jane", "lastname": "Doe"}]): add multiple rows at once
  • Fn("google/sheets", method="getRows", limit=100, offset=0): retrieve the first 100 rows of your sheet
  • Fn("google/sheets", method="clear"): remove all the data in this sheet.

Optional properties:

  • spreadsheet_id: Must be set either in each function call or in the environment variables. If it is set in both places, the one in the function call will be used.
  • sheet_index: If you are using a sheet other than the first spreadsheet tab, please pass its index (starting at 0). Defaults to 0.

Many more integrations are coming!

If you have a cool integration in mind, drop us an email on contact@csml.dev and tell us all about it!

Many of our 43 currently available integrations come directly from your suggestions!

Join the Community
on Slack Slack

Come and learn all about CSML with other chatbot enthusiasts on the Slack CSML Community! ūü§ó