Konverse AI Developer Hub
  • Konverse AI Developer Hub
  • Getting Started
    • Authentication
    • Errors
    • Rate Limit
  • Webhooks
    • Webhook Endpoints
  • Platform
    • Embedded Functions
      • Send Text Message
      • Send Quick Reply
      • Set Variables
      • Send Choice
      • Send Cards
      • Stop Propagation
      • Query a Dataset
      • Jump To Story
      • Query a Google Sheet
    • Datasets
    • Bot Webhooks
  • Messaging Channels
    • Introduction to Channels
    • Web Chat
    • Facebook Messenger
    • WhatsApp
      • Send WhatsApp Notifications
      • Send Session Message
    • Line
  • App Integration
    • Android App Integration
Powered by GitBook
On this page

Was this helpful?

  1. Platform
  2. Embedded Functions

Query a Google Sheet

Our platform lets you read a write to a google sheet directly.

Please note it works with only with Google Sheets, and not xlsx files hosted on google

Package

const sheets = require("@googlesheets");

Reading a sheet

To allow reading from a google sheet, please write to support@konverse.ai, to get email ID of the chatbot to which you will need to grant permissions

let rows = await sheets.readSheet(workBookId, sheetId)
rows.map(row => {
  let first_name = row["First Name"]
});
Parameter
Description

workbookID

The ID of the google sheet, from its URL

sheetID

Index of your sheet starting from 0. To read first sheet in your google sheet, pass 0

Append a row in google sheet

let sheet = await sheets.getSheet(workbookID, sheetID);
const larryRow = await sheet.addRow({ name: 'Larry Page', email: 'larry@google.com' });
PreviousJump To StoryNextDatasets

Last updated 3 years ago

Was this helpful?