Update integrations.py
Browse files- integrations.py +18 -11
integrations.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
# integrations.py (Notification System)
|
2 |
import smtplib
|
3 |
from email.mime.multipart import MIMEMultipart
|
4 |
from email.mime.text import MIMEText
|
@@ -6,20 +5,29 @@ import config
|
|
6 |
|
7 |
class Notifier:
|
8 |
def send_comprehensive_report(self, summary, action_items, decisions, transcript, recipients):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# Create plain text content
|
10 |
text_content = f"""
|
11 |
Meeting Summary:
|
12 |
{summary}
|
13 |
|
14 |
Action Items:
|
15 |
-
{
|
16 |
|
17 |
Key Decisions:
|
18 |
-
{
|
19 |
|
20 |
Full Transcript:
|
21 |
{transcript}
|
22 |
-
|
23 |
|
24 |
# Send to all requested channels
|
25 |
for recipient in recipients:
|
@@ -50,18 +58,17 @@ Full Transcript:
|
|
50 |
|
51 |
def _send_email_alert(self, to_address, action_items):
|
52 |
subject = "URGENT: Action Item Detected in Meeting"
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
)
|
57 |
|
58 |
body = f"""
|
59 |
Urgent action items were detected during the meeting:
|
60 |
-
|
61 |
{items_text}
|
62 |
-
|
63 |
Please address these immediately.
|
64 |
-
|
65 |
|
66 |
msg = MIMEMultipart()
|
67 |
msg['From'] = config.EMAIL_SENDER
|
|
|
|
|
1 |
import smtplib
|
2 |
from email.mime.multipart import MIMEMultipart
|
3 |
from email.mime.text import MIMEText
|
|
|
5 |
|
6 |
class Notifier:
|
7 |
def send_comprehensive_report(self, summary, action_items, decisions, transcript, recipients):
|
8 |
+
# Create action items text
|
9 |
+
action_items_text = "\n".join(
|
10 |
+
f"- {item['task']} (Owner: {item['owner']}, Deadline: {item['deadline']})"
|
11 |
+
for item in action_items
|
12 |
+
)
|
13 |
+
|
14 |
+
# Create decisions text
|
15 |
+
decisions_text = "\n".join(f"- {decision}" for decision in decisions)
|
16 |
+
|
17 |
# Create plain text content
|
18 |
text_content = f"""
|
19 |
Meeting Summary:
|
20 |
{summary}
|
21 |
|
22 |
Action Items:
|
23 |
+
{action_items_text}
|
24 |
|
25 |
Key Decisions:
|
26 |
+
{decisions_text}
|
27 |
|
28 |
Full Transcript:
|
29 |
{transcript}
|
30 |
+
"""
|
31 |
|
32 |
# Send to all requested channels
|
33 |
for recipient in recipients:
|
|
|
58 |
|
59 |
def _send_email_alert(self, to_address, action_items):
|
60 |
subject = "URGENT: Action Item Detected in Meeting"
|
61 |
+
|
62 |
+
# Create action items list
|
63 |
+
items_text = "\n".join(f"• {item['task']}" for item in action_items)
|
|
|
64 |
|
65 |
body = f"""
|
66 |
Urgent action items were detected during the meeting:
|
67 |
+
|
68 |
{items_text}
|
69 |
+
|
70 |
Please address these immediately.
|
71 |
+
"""
|
72 |
|
73 |
msg = MIMEMultipart()
|
74 |
msg['From'] = config.EMAIL_SENDER
|