From b6aea9e0da1db2d2aff24da51ab5cf815f7e917c Mon Sep 17 00:00:00 2001 From: aakashb95 Date: Mon, 19 Jan 2026 13:17:43 +0530 Subject: [PATCH] add: mailers to admins to update openai key --- .../integrations_notification_mailer.rb | 6 ++++++ .../openai_disconnect.liquid | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 app/views/mailers/administrator_notifications/integrations_notification_mailer/openai_disconnect.liquid diff --git a/app/mailers/administrator_notifications/integrations_notification_mailer.rb b/app/mailers/administrator_notifications/integrations_notification_mailer.rb index 05477eca1..ad43e97e6 100644 --- a/app/mailers/administrator_notifications/integrations_notification_mailer.rb +++ b/app/mailers/administrator_notifications/integrations_notification_mailer.rb @@ -9,4 +9,10 @@ class AdministratorNotifications::IntegrationsNotificationMailer < Administrator subject = 'Your Dialogflow integration was disconnected' send_notification(subject) end + + def openai_disconnect + subject = 'Your OpenAI integration needs attention' + action_url = settings_url('integrations/openai') + send_notification(subject, action_url: action_url) + end end diff --git a/app/views/mailers/administrator_notifications/integrations_notification_mailer/openai_disconnect.liquid b/app/views/mailers/administrator_notifications/integrations_notification_mailer/openai_disconnect.liquid new file mode 100644 index 000000000..74ef99463 --- /dev/null +++ b/app/views/mailers/administrator_notifications/integrations_notification_mailer/openai_disconnect.liquid @@ -0,0 +1,9 @@ +

Hello,

+ +

Your OpenAI integration needs attention. This could be due to an expired or invalid API key, or your OpenAI credit balance may be exhausted.

+ +

To continue using AI features, please update your API key in the integration settings.

+ +

+Click here to update your API key. +