Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

Dialog 2: Switching Topics

Dialog 3: Latest Circulars

Keywords Used

KeywordPurpose
GET BOT MEMORYRetrieve stored announcement summaries
SET CONTEXTDefine contexts for different topics
CLEAR SUGGESTIONSReset quick reply options
ADD SUGGESTIONCreate topic-based quick replies
ADD TOOLRegister topic switching tool
TALKDisplay announcements to user

How It Works

  1. Load Content: Pre-stored summaries are retrieved from bot memory
  2. Multi-Context Setup: Different contexts for each announcement topic
  3. Topic Suggestions: Quick replies organized by topic category
  4. Dynamic Display: Current announcements shown on start
  5. 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

  1. Keep It Current: Update announcements regularly
  2. Organize by Topic: Use clear topic categories
  3. Summarize: Start with key points, allow drill-down
  4. Archive Old News: Move outdated items to archive
  5. Track Engagement: Monitor which topics get most questions