From cd93d327a5b1368abcb02a51ccf9325cb5876af9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 16 May 2023 10:02:11 +0200 Subject: [PATCH] Test google sheets --- packages/server/src/integrations/googlesheets.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/server/src/integrations/googlesheets.ts b/packages/server/src/integrations/googlesheets.ts index 0b2be54fb3..6cad048c83 100644 --- a/packages/server/src/integrations/googlesheets.ts +++ b/packages/server/src/integrations/googlesheets.ts @@ -141,6 +141,16 @@ class GoogleSheetsIntegration implements DatasourcePlus { this.client = new GoogleSpreadsheet(spreadsheetId) } + async testConnection() { + try { + await this.connect() + await this.client.loadInfo() + return true + } catch (e: any) { + return { error: e.message as string } + } + } + getBindingIdentifier() { return "" }