teams-api-5-proactive-messaging
Sub-skill of teams-api: 5. Proactive Messaging.
Best use case
teams-api-5-proactive-messaging is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of teams-api: 5. Proactive Messaging.
Teams using teams-api-5-proactive-messaging should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/5-proactive-messaging/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How teams-api-5-proactive-messaging Compares
| Feature / Agent | teams-api-5-proactive-messaging | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of teams-api: 5. Proactive Messaging.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 5. Proactive Messaging
## 5. Proactive Messaging
```python
# proactive.py
# ABOUTME: Send proactive messages to Teams channels and users
# ABOUTME: Notify users without them initiating conversation
from botbuilder.core import TurnContext
from botbuilder.core.teams import TeamsInfo
from botbuilder.schema import Activity, ConversationReference
from botbuilder.integration.aiohttp import CloudAdapter, ConfigurationBotFrameworkAuthentication
import asyncio
from typing import Dict
class ProactiveMessenger:
"""Send proactive messages to Teams"""
def __init__(
self,
adapter: CloudAdapter,
app_id: str,
conversation_references: Dict[str, ConversationReference]
):
self.adapter = adapter
self.app_id = app_id
self.conversation_references = conversation_references
async def send_to_conversation(
self,
conversation_id: str,
message: str = None,
card: Dict = None
):
"""Send a proactive message to a stored conversation"""
if conversation_id not in self.conversation_references:
raise ValueError(f"No conversation reference for {conversation_id}")
conversation_reference = self.conversation_references[conversation_id]
async def callback(turn_context: TurnContext):
if card:
from botbuilder.schema import Attachment
from botbuilder.core import MessageFactory
attachment = Attachment(
content_type="application/vnd.microsoft.card.adaptive",
content=card
)
await turn_context.send_activity(
MessageFactory.attachment(attachment)
)
else:
await turn_context.send_activity(message)
await self.adapter.continue_conversation(
conversation_reference,
callback,
self.app_id
)
async def send_to_channel(
self,
service_url: str,
team_id: str,
channel_id: str,
message: str = None,
card: Dict = None
):
"""Send a proactive message to a Teams channel"""
from botbuilder.schema import (
ConversationParameters,
Activity,
ChannelAccount
)
# Create conversation reference for channel
conversation_parameters = ConversationParameters(
is_group=True,
channel_data={"channel": {"id": channel_id}},
activity=Activity(
type="message",
text=message
) if message else None
)
async def callback(turn_context: TurnContext):
if card:
from botbuilder.schema import Attachment
from botbuilder.core import MessageFactory
attachment = Attachment(
content_type="application/vnd.microsoft.card.adaptive",
content=card
)
await turn_context.send_activity(
MessageFactory.attachment(attachment)
)
elif message:
await turn_context.send_activity(message)
# Create and send the proactive message
conversation_reference = ConversationReference(
service_url=service_url,
channel_id="msteams",
conversation={"id": channel_id}
)
await self.adapter.continue_conversation(
conversation_reference,
callback,
self.app_id
)
async def notify_all_conversations(
self,
message: str = None,
card: Dict = None
):
"""Broadcast a message to all stored conversations"""
for conv_id in self.conversation_references:
try:
await self.send_to_conversation(conv_id, message, card)
except Exception as e:
print(f"Failed to notify {conv_id}: {e}")
# Example usage with Azure Functions
"""
# function_app.py
import azure.functions as func
from proactive import ProactiveMessenger
async def notify_deployment_complete(req: func.HttpRequest) -> func.HttpResponse:
# Load configuration and adapter
messenger = ProactiveMessenger(adapter, app_id, conversation_references)
card = create_deployment_card(
app_name="my-service",
environment="production",
version="v1.2.3",
status="success"
)
await messenger.send_to_channel(
service_url="https://smba.trafficmanager.net/teams/",
team_id="your-team-id",
channel_id="your-channel-id",
card=card
)
return func.HttpResponse("Notification sent", status_code=200)
"""
```Related Skills
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
agent-teams-workspace-work-profile-updated-2026-03-10
Sub-skill of agent-teams: Workspace Work Profile (Updated 2026-03-10).
agent-teams-work-queue-integration
Sub-skill of agent-teams: Work Queue Integration.
agent-teams-subagent-startup-convention
Sub-skill of agent-teams: Subagent startup convention (+2).
agent-teams-idle-state
Sub-skill of agent-teams: Idle State.
agent-teams-dm-default-always-prefer
Sub-skill of agent-teams: DM (default — always prefer) (+2).
agent-teams-decision-matrix-team-vs-sequential
Sub-skill of agent-teams: Decision Matrix: Team vs Sequential.
agent-teams-core-constraint
Sub-skill of agent-teams: Core Constraint.
agent-teams-agent-types-for-common-tasks
Sub-skill of agent-teams: Agent Types for Common Tasks.
agent-teams-activation
Sub-skill of agent-teams: Activation.
agent-teams-1-create-team
Sub-skill of agent-teams: 1. Create team (+5).
memory-management-teams
Sub-skill of memory-management: Teams.