Announcements Template
The announcements template provides a company communication system for sharing weekly updates, circulars, and organizational news through an AI-powered conversational interface.
Topic: Company Announcements & Communications
This template is perfect for:
- Weekly company announcements
- Internal circulars distribution
- Multi-topic news aggregation
- Organizational communications
- Employee information portals
The Code
resume1 = GET BOT MEMORY("resume")
resume2 = GET BOT MEMORY("auxiliom")
resume3 = GET BOT MEMORY("toolbix")
SET CONTEXT "general" AS resume1
SET CONTEXT "auxiliom" AS resume2
SET CONTEXT "toolbix" AS resume3
CLEAR SUGGESTIONS
ADD SUGGESTION "general" AS "Weekly announcements"
ADD SUGGESTION "general" AS "Latest circulars"
ADD SUGGESTION "auxiliom" AS "What is Auxiliom?"
ADD SUGGESTION "auxiliom" AS "Auxiliom services"
ADD SUGGESTION "toolbix" AS "Toolbix features"
ADD SUGGESTION "toolbix" AS "Toolbix for business"
ADD TOOL "change-subject"
TALK resume1
TALK "Ask me about any announcement or circular."
Sample Dialogs
These conversations show how the announcements template works in real-world scenarios.
Dialog 1: Weekly Announcements
📢
Company News
online
Today
Dialog 2: Switching Topics
📢
Company News
online
Dialog 3: Latest Circulars
📢
Company News
online
Keywords Used
| Keyword | Purpose |
|---|---|
GET BOT MEMORY | Retrieve stored announcement summaries |
SET CONTEXT | Define contexts for different topics |
CLEAR SUGGESTIONS | Reset quick reply options |
ADD SUGGESTION | Create topic-based quick replies |
ADD TOOL | Register topic switching tool |
TALK | Display announcements to user |
How It Works
- Load Content: Pre-stored summaries are retrieved from bot memory
- Multi-Context Setup: Different contexts for each announcement topic
- Topic Suggestions: Quick replies organized by topic category
- Dynamic Display: Current announcements shown on start
- Topic Switching: Users can change subjects using the tool
Template Structure
announcements.gbai/
├── announcements.gbdialog/
│ ├── start.bas # Main entry point
│ ├── auth.bas # Admin authentication
│ ├── change-subject.bas # Topic switching
│ └── update-summary.bas # Update announcements
├── announcements.gbkb/
│ ├── auxiliom/ # Auxiliom topic KB
│ ├── news/ # General news KB
│ └── toolbix/ # Toolbix topic KB
└── announcements.gbot/
└── config.csv # Bot configuration
Change Subject Tool: change-subject.bas
PARAM subject AS STRING LIKE "toolbix" DESCRIPTION "Topic to switch to: general, auxiliom, toolbix"
DESCRIPTION "Change the current announcement topic"
subject_lower = LCASE(subject)
IF subject_lower = "general" OR INSTR(subject_lower, "news") > 0 OR INSTR(subject_lower, "announcement") > 0 THEN
resume = GET BOT MEMORY("resume")
SET CONTEXT "current" AS resume
TALK "📰 Switched to **General Announcements**"
TALK resume
ELSE IF subject_lower = "auxiliom" THEN
resume = GET BOT MEMORY("auxiliom")
SET CONTEXT "current" AS resume
TALK "🔧 Switched to **Auxiliom**"
TALK resume
ELSE IF subject_lower = "toolbix" THEN
resume = GET BOT MEMORY("toolbix")
SET CONTEXT "current" AS resume
TALK "🛠️ Switched to **Toolbix**"
TALK resume
ELSE
TALK "Available topics: General Announcements, Auxiliom, Toolbix"
TALK "Which topic would you like?"
END IF
RETURN subject_lower
Update Summary Tool: update-summary.bas
PARAM topic AS STRING LIKE "general" DESCRIPTION "Topic to update"
PARAM content AS STRING DESCRIPTION "New summary content"
DESCRIPTION "Update the announcement summary for a topic (admin only)"
' Verify admin access
IF NOT IS_ADMIN(user_id) THEN
TALK "⚠️ This action requires administrator privileges."
RETURN NULL
END IF
topic_lower = LCASE(topic)
IF topic_lower = "general" THEN
SET BOT MEMORY "resume", content
ELSE IF topic_lower = "auxiliom" THEN
SET BOT MEMORY "auxiliom", content
ELSE IF topic_lower = "toolbix" THEN
SET BOT MEMORY "toolbix", content
ELSE
TALK "Unknown topic. Use: general, auxiliom, or toolbix"
RETURN NULL
END IF
' Log the update
WITH updateLog
timestamp = NOW()
updatedBy = user_id
topicUpdated = topic_lower
contentLength = LEN(content)
END WITH
SAVE "announcement_log.csv", updateLog
TALK "✅ " + topic + " summary updated successfully!"
TALK "Changes are now live."
RETURN topic_lower
Customization Ideas
Add Email Distribution
ADD TOOL "send-announcement"
PARAM announcement AS STRING DESCRIPTION "Announcement to distribute"
PARAM recipients AS STRING LIKE "all" DESCRIPTION "Recipients: all, managers, department name"
' Get recipient list
IF recipients = "all" THEN
employees = FIND "employees.csv"
ELSE IF recipients = "managers" THEN
employees = FIND "employees.csv", "role = 'manager'"
ELSE
employees = FIND "employees.csv", "department = '" + recipients + "'"
END IF
FOR EACH emp IN employees
SEND MAIL emp.email, "Company Announcement", announcement
WAIT 1
NEXT
TALK "📧 Announcement sent to " + UBOUND(employees) + " recipients."
Add Announcement Categories
CLEAR SUGGESTIONS
ADD SUGGESTION "hr" AS "HR Updates"
ADD SUGGESTION "it" AS "IT Announcements"
ADD SUGGESTION "finance" AS "Finance News"
ADD SUGGESTION "events" AS "Upcoming Events"
ADD SUGGESTION "policy" AS "Policy Changes"
ADD SUGGESTION "all" AS "All Announcements"
Add Read Receipts
' Track who has read announcements
WITH readReceipt
userId = user_id
announcementId = current_announcement_id
readAt = NOW()
END WITH
SAVE "read_receipts.csv", readReceipt
' Check read percentage
total = COUNT("employees.csv")
reads = COUNT("read_receipts.csv", "announcementId = '" + current_announcement_id + "'")
percentage = (reads / total) * 100
TALK "📊 " + FORMAT(percentage, "#0") + "% of employees have read this announcement."
Add Scheduled Announcements
PARAM schedule_time AS STRING LIKE "2025-01-20 09:00" DESCRIPTION "When to publish"
PARAM announcement AS STRING DESCRIPTION "Announcement content"
SET SCHEDULE schedule_time
SET BOT MEMORY "resume", announcement
' Notify all employees
employees = FIND "employees.csv"
FOR EACH emp IN employees
TALK TO emp.phone, "📢 New announcement: " + LEFT(announcement, 100) + "..."
NEXT
TALK "Announcement published and distributed."
Best Practices
- Keep It Current: Update announcements regularly
- Organize by Topic: Use clear topic categories
- Summarize: Start with key points, allow drill-down
- Archive Old News: Move outdated items to archive
- Track Engagement: Monitor which topics get most questions
Related Templates
- broadcast.bas - Mass messaging to employees
- edu.bas - Educational announcements
- hr-employees.bas - Employee communications