From 65ada7f8b204789952fc58f691a757e0baf5d76c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 13 Mar 2023 18:10:35 +0000 Subject: [PATCH] Adding back a base column for sheet creation. --- packages/server/src/integrations/googlesheets.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/googlesheets.ts b/packages/server/src/integrations/googlesheets.ts index 85cc8c0682..e9fde99a2b 100644 --- a/packages/server/src/integrations/googlesheets.ts +++ b/packages/server/src/integrations/googlesheets.ts @@ -308,9 +308,12 @@ class GoogleSheetsIntegration implements DatasourcePlus { } async createTable(name?: string) { + if (!name) { + throw new Error("Must provide name for new sheet.") + } try { await this.connect() - return await this.client.addSheet({ title: name, headerValues: [] }) + return await this.client.addSheet({ title: name, headerValues: [name] }) } catch (err) { console.error("Error creating new table in google sheets", err) throw err