diff --git a/server/notification-providers/google-sheets.js b/server/notification-providers/google-sheets.js
new file mode 100644
index 000000000..6220e272f
--- /dev/null
+++ b/server/notification-providers/google-sheets.js
@@ -0,0 +1,60 @@
+const NotificationProvider = require("./notification-provider");
+const axios = require("axios");
+const { DOWN, UP } = require("../../src/util");
+
+class GoogleSheets extends NotificationProvider {
+ name = "GoogleSheets";
+
+ /**
+ * @inheritdoc
+ */
+ async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
+ const okMsg = "Sent Successfully.";
+
+ try {
+ // Prepare the data to be logged
+ const timestamp = new Date().toISOString();
+ let status = "N/A";
+ let monitorName = "N/A";
+ let monitorUrl = "N/A";
+ let responseTime = "N/A";
+ let statusCode = "N/A";
+
+ if (monitorJSON) {
+ monitorName = monitorJSON.name || "N/A";
+ monitorUrl = this.extractAddress(monitorJSON) || "N/A";
+ }
+
+ if (heartbeatJSON) {
+ status = heartbeatJSON.status === DOWN ? "DOWN" : heartbeatJSON.status === UP ? "UP" : "UNKNOWN";
+ responseTime = heartbeatJSON.ping || "N/A";
+ statusCode = heartbeatJSON.statusCode || "N/A";
+ }
+
+ // Send data to Google Apps Script webhook
+ const config = this.getAxiosConfigWithProxy({
+ headers: {
+ "Content-Type": "application/json",
+ },
+ });
+
+ const data = {
+ timestamp,
+ status,
+ monitorName,
+ monitorUrl,
+ message: msg,
+ responseTime,
+ statusCode,
+ };
+
+ await axios.post(notification.googleSheetsWebhookUrl, data, config);
+
+ return okMsg;
+ } catch (error) {
+ this.throwGeneralAxiosError(error);
+ }
+ }
+}
+
+module.exports = GoogleSheets;
diff --git a/server/notification.js b/server/notification.js
index de429388c..a1a6fec3c 100644
--- a/server/notification.js
+++ b/server/notification.js
@@ -17,6 +17,7 @@ const Feishu = require("./notification-providers/feishu");
const Notifery = require("./notification-providers/notifery");
const FreeMobile = require("./notification-providers/freemobile");
const GoogleChat = require("./notification-providers/google-chat");
+const GoogleSheets = require("./notification-providers/google-sheets");
const Gorush = require("./notification-providers/gorush");
const Gotify = require("./notification-providers/gotify");
const GrafanaOncall = require("./notification-providers/grafana-oncall");
@@ -117,6 +118,7 @@ class Notification {
new Feishu(),
new FreeMobile(),
new GoogleChat(),
+ new GoogleSheets(),
new Gorush(),
new Gotify(),
new GrafanaOncall(),
diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue
index 6d915255a..1c8bd68cb 100644
--- a/src/components/NotificationDialog.vue
+++ b/src/components/NotificationDialog.vue
@@ -305,7 +305,9 @@ export default {
};
// Other Integrations
- let other = {};
+ let other = {
+ GoogleSheets: "Google Sheets",
+ };
// Regional - Not supported in most regions or documentation is not in English
let regional = {
diff --git a/src/components/notifications/GoogleSheets.vue b/src/components/notifications/GoogleSheets.vue
new file mode 100644
index 000000000..261cc4c5a
--- /dev/null
+++ b/src/components/notifications/GoogleSheets.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
{{ $t("Deploy a Google Apps Script as a web app and paste the URL here") }}
+
+
+
+
+
{{ $t("Quick Setup Guide") }}:
+
+
{{ $t("Open your Google Spreadsheet") }}
+
{{ $t("Go to Extensions → Apps Script") }}
+
{{ $t("Paste the script code (see below)") }}
+
{{ $t("Click Deploy → New deployment → Web app") }}
+
{{ $t("Set 'Execute as: Me' and 'Who has access: Anyone'") }}
+
{{ $t("Copy the web app URL and paste it above") }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js
index 1a8f6dba3..6a7c3e71b 100644
--- a/src/components/notifications/index.js
+++ b/src/components/notifications/index.js
@@ -15,6 +15,7 @@ import Elks from "./46elks.vue";
import Feishu from "./Feishu.vue";
import FreeMobile from "./FreeMobile.vue";
import GoogleChat from "./GoogleChat.vue";
+import GoogleSheets from "./GoogleSheets.vue";
import Gorush from "./Gorush.vue";
import Gotify from "./Gotify.vue";
import GrafanaOncall from "./GrafanaOncall.vue";
@@ -105,6 +106,7 @@ const NotificationFormList = {
Feishu: Feishu,
FreeMobile: FreeMobile,
GoogleChat: GoogleChat,
+ GoogleSheets: GoogleSheets,
gorush: Gorush,
gotify: Gotify,
GrafanaOncall: GrafanaOncall,
diff --git a/src/lang/en.json b/src/lang/en.json
index a2a87669d..39d24bc26 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -733,6 +733,19 @@
"pushyToken": "Device token",
"apprise": "Apprise (Support 50+ Notification services)",
"GoogleChat": "Google Chat (Google Workspace only)",
+ "Google Apps Script Webhook URL": "Google Apps Script Webhook URL",
+ "Deploy a Google Apps Script as a web app and paste the URL here": "Deploy a Google Apps Script as a web app and paste the URL here",
+ "Quick Setup Guide": "Quick Setup Guide",
+ "Open your Google Spreadsheet": "Open your Google Spreadsheet",
+ "Go to Extensions → Apps Script": "Go to Extensions → Apps Script",
+ "Paste the script code (see below)": "Paste the script code (see below)",
+ "Click Deploy → New deployment → Web app": "Click Deploy → New deployment → Web app",
+ "Set 'Execute as: Me' and 'Who has access: Anyone'": "Set 'Execute as: Me' and 'Who has access: Anyone'",
+ "Copy the web app URL and paste it above": "Copy the web app URL and paste it above",
+ "Google Apps Script Code": "Google Apps Script Code",
+ "Copy to Clipboard": "Copy to Clipboard",
+ "Copied to clipboard!": "Copied to clipboard!",
+ "Failed to copy to clipboard": "Failed to copy to clipboard",
"Template plain text instead of using cards": "Template plain text instead of using cards",
"issueWithGoogleChatOnAndroidHelptext": "This also allows to get around bugs upstream like {issuetackerURL}",
"wayToGetKookBotToken": "Create application and get your bot token at {0}",