teams-api-4-bot-framework-integration

Sub-skill of teams-api: 4. Bot Framework Integration.

5 stars

Best use case

teams-api-4-bot-framework-integration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of teams-api: 4. Bot Framework Integration.

Teams using teams-api-4-bot-framework-integration 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

$curl -o ~/.claude/skills/4-bot-framework-integration/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/business/communication/teams-api/4-bot-framework-integration/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/4-bot-framework-integration/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How teams-api-4-bot-framework-integration Compares

Feature / Agentteams-api-4-bot-framework-integrationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of teams-api: 4. Bot Framework Integration.

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

# 4. Bot Framework Integration

## 4. Bot Framework Integration


```python
# bot.py
# ABOUTME: Teams bot using Bot Framework SDK
# ABOUTME: Handles messages, cards, and proactive messaging

from botbuilder.core import (
    ActivityHandler,
    TurnContext,
    CardFactory,
    MessageFactory
)
from botbuilder.schema import (
    Activity,
    ActivityTypes,
    ChannelAccount,
    Attachment
)
import json

class TeamsBot(ActivityHandler):
    """Microsoft Teams bot handler"""

    def __init__(self, conversation_references: dict = None):
        self.conversation_references = conversation_references or {}

    async def on_message_activity(self, turn_context: TurnContext):
        """Handle incoming messages"""

        # Store conversation reference for proactive messaging
        self._add_conversation_reference(turn_context.activity)

        text = turn_context.activity.text.lower().strip()
        user_name = turn_context.activity.from_property.name

        if text == "help":
            await self._send_help_card(turn_context)
        elif text == "status":
            await self._send_status_card(turn_context)
        elif text.startswith("deploy"):
            await self._handle_deploy_command(turn_context, text)
        else:
            await turn_context.send_activity(
                f"Hi {user_name}! I received: '{text}'. Type 'help' for commands."
            )

    async def on_members_added_activity(
        self,
        members_added: list,
        turn_context: TurnContext
    ):
        """Handle new members added to conversation"""
        for member in members_added:
            if member.id != turn_context.activity.recipient.id:
                await turn_context.send_activity(
                    f"Welcome to the team, {member.name}! "
                    "Type 'help' to see available commands."
                )

    async def on_adaptive_card_invoke(
        self,
        turn_context: TurnContext,
        invoke_value: dict
    ):
        """Handle Adaptive Card action invocations"""

        action = invoke_value.get("action")
        data = invoke_value

        if action == "approve":
            return await self._handle_approval(turn_context, data, approved=True)
        elif action == "reject":
            return await self._handle_approval(turn_context, data, approved=False)
        elif action == "vote":
            return await self._handle_vote(turn_context, data)

        return {"status": 200}

    async def _send_help_card(self, turn_context: TurnContext):
        """Send help card"""

        card = {
            "type": "AdaptiveCard",
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "version": "1.4",
            "body": [
                {
                    "type": "TextBlock",
                    "text": "Bot Commands",
                    "size": "large",
                    "weight": "bolder"
                },
                {
                    "type": "FactSet",
                    "facts": [
                        {"title": "help", "value": "Show this help message"},
                        {"title": "status", "value": "Show system status"},
                        {"title": "deploy [env]", "value": "Trigger deployment"},
                        {"title": "poll [question]", "value": "Create a poll"}
                    ]
                }
            ]
        }

        attachment = Attachment(
            content_type="application/vnd.microsoft.card.adaptive",
            content=card
        )

        await turn_context.send_activity(
            MessageFactory.attachment(attachment)
        )

    async def _send_status_card(self, turn_context: TurnContext):
        """Send status card"""

        card = {
            "type": "AdaptiveCard",
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "version": "1.4",
            "body": [
                {
                    "type": "TextBlock",
                    "text": "System Status",
                    "size": "large",
                    "weight": "bolder"
                },
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {"type": "TextBlock", "text": "API", "weight": "bolder"},
                                {"type": "TextBlock", "text": "Healthy", "color": "good"}
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {"type": "TextBlock", "text": "Database", "weight": "bolder"},
                                {"type": "TextBlock", "text": "Healthy", "color": "good"}
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {"type": "TextBlock", "text": "Cache", "weight": "bolder"},
                                {"type": "TextBlock", "text": "Warning", "color": "warning"}
                            ]
                        }
                    ]
                }
            ],
            "actions": [
                {
                    "type": "Action.OpenUrl",
                    "title": "View Dashboard",
                    "url": "https://status.example.com"
                }
            ]
        }

        attachment = Attachment(
            content_type="application/vnd.microsoft.card.adaptive",
            content=card
        )

        await turn_context.send_activity(
            MessageFactory.attachment(attachment)
        )

    async def _handle_deploy_command(
        self,
        turn_context: TurnContext,
        text: str
    ):
        """Handle deploy command"""

        parts = text.split()
        environment = parts[1] if len(parts) > 1 else "staging"


*Content truncated — see parent skill for full reference.*

Related Skills

agent-os-framework

5
from vamseeachanta/workspace-hub

Generate standardized .agent-os directory structure with product documentation, mission, tech-stack, roadmap, and decision records. Enables AI-native workflows.

teams-meeting-pipeline

5
from vamseeachanta/workspace-hub

Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

library-evaluation-integration

5
from vamseeachanta/workspace-hub

Create evaluation scripts and integration tests for Python scientific libraries in the digitalmodel package. Follows the established pattern from fluids, ht, meshio, sectionproperties, and pygmt evaluations.

clean-worktree-integration-from-dirty-main

5
from vamseeachanta/workspace-hub

Land validated issue work from isolated worktrees when the main checkout is dirty by creating a fresh integration worktree, cherry-picking only implementation commits, re-running combined validation, and preparing push/closeout artifacts.

hermes-ecosystem-integration

5
from vamseeachanta/workspace-hub

Wire Hermes into workspace-hub ecosystem — multi-repo skills, config sync, session export to learning pipeline, memory cross-pollination, skill patch tracking, and cross-machine health checks.

api-integration

5
from vamseeachanta/workspace-hub

Integrate offshore engineering software APIs with mock testing for OrcaFlex, AQWA, and WAMIT

llm-wiki-roadmap-integration

5
from vamseeachanta/workspace-hub

Integrate repo-ecosystem work into an existing llm-wiki / knowledge-roadmap issue without creating duplicate GitHub issues.

mkdocs-integration-with-python-package

5
from vamseeachanta/workspace-hub

Sub-skill of mkdocs: Integration with Python Package (+2).

bash-script-framework-example-1-create-new-cli-tool

5
from vamseeachanta/workspace-hub

Sub-skill of bash-script-framework: Example 1: Create New CLI Tool (+1).

bash-script-framework

5
from vamseeachanta/workspace-hub

Create organized bash script structure with color output, menu systems, error handling, and cross-platform support. Standardizes CLI tooling.

bash-cli-framework-5-error-handling

5
from vamseeachanta/workspace-hub

Sub-skill of bash-cli-framework: 5. Error Handling (+1).

bash-cli-framework-1-color-definitions

5
from vamseeachanta/workspace-hub

Sub-skill of bash-cli-framework: 1. Color Definitions (+3).