teams-api-3-incoming-webhooks

Sub-skill of teams-api: 3. Incoming Webhooks.

5 stars

Best use case

teams-api-3-incoming-webhooks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of teams-api: 3. Incoming Webhooks.

Teams using teams-api-3-incoming-webhooks 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/3-incoming-webhooks/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/business/communication/teams-api/3-incoming-webhooks/SKILL.md"

Manual Installation

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

How teams-api-3-incoming-webhooks Compares

Feature / Agentteams-api-3-incoming-webhooksStandard 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: 3. Incoming Webhooks.

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

# 3. Incoming Webhooks

## 3. Incoming Webhooks


```python
# webhooks.py
# ABOUTME: Teams incoming webhook integration
# ABOUTME: Simple notifications without full bot registration

import requests
import json
from typing import Dict, List, Optional
from datetime import datetime

class TeamsWebhook:
    """Incoming webhook client for Microsoft Teams"""

    def __init__(self, webhook_url: str):
        self.webhook_url = webhook_url

    def send(
        self,
        text: str = None,
        title: str = None,
        sections: List[Dict] = None,
        theme_color: str = None,
        adaptive_card: Dict = None
    ) -> dict:
        """Send a message via webhook"""

        if adaptive_card:
            # Send Adaptive Card
            payload = {
                "type": "message",
                "attachments": [
                    {
                        "contentType": "application/vnd.microsoft.card.adaptive",
                        "contentUrl": None,
                        "content": adaptive_card
                    }
                ]
            }
        else:
            # Send Message Card (legacy but simpler)
            payload = {
                "@type": "MessageCard",
                "@context": "http://schema.org/extensions",
                "themeColor": theme_color or "0076D7",
                "summary": title or text[:50] if text else "Notification"
            }

            if title:
                payload["title"] = title

            if text:
                payload["text"] = text

            if sections:
                payload["sections"] = sections

        response = requests.post(
            self.webhook_url,
            json=payload,
            headers={"Content-Type": "application/json"}
        )

        if response.status_code == 200:
            return {"ok": True, "status": response.status_code}
        else:
            return {
                "ok": False,
                "status": response.status_code,
                "error": response.text
            }

    def send_deployment_notification(
        self,
        app_name: str,
        environment: str,
        version: str,
        status: str,
        commit_sha: str,
        author: str,
        deploy_url: str = None,
        logs_url: str = None
    ):
        """Send a deployment notification"""

        theme_colors = {
            "success": "00FF00",
            "failure": "FF0000",
            "started": "FFCC00",
            "pending": "808080"
        }

        status_emoji = {
            "success": "OK",
            "failure": "X",
            "started": "ROCKET",
            "pending": "CLOCK"
        }

        sections = [
            {
                "activityTitle": f"Deployment {status.title()}: {app_name}",
                "activitySubtitle": f"by {author}",
                "facts": [
                    {"name": "Environment", "value": environment},
                    {"name": "Version", "value": version},
                    {"name": "Commit", "value": commit_sha[:8]},
                    {"name": "Time", "value": datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
                ],
                "markdown": True
            }
        ]

        potential_actions = []
        if deploy_url:
            potential_actions.append({
                "@type": "OpenUri",
                "name": "View Deployment",
                "targets": [{"os": "default", "uri": deploy_url}]
            })
        if logs_url:
            potential_actions.append({
                "@type": "OpenUri",
                "name": "View Logs",
                "targets": [{"os": "default", "uri": logs_url}]
            })

        if potential_actions:
            sections[0]["potentialAction"] = potential_actions

        return self.send(
            title=f"Deployment {status.title()}",
            sections=sections,
            theme_color=theme_colors.get(status, "0076D7")
        )

    def send_alert(
        self,
        title: str,
        message: str,
        severity: str = "warning",
        source: str = "System",
        details: Optional[Dict] = None,
        action_url: Optional[str] = None
    ):
        """Send an alert notification"""

        severity_colors = {
            "critical": "FF0000",
            "error": "FF4444",
            "warning": "FFCC00",
            "info": "0088FF"
        }

        facts = [
            {"name": "Severity", "value": severity.upper()},
            {"name": "Source", "value": source},
            {"name": "Time", "value": datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
        ]

        if details:
            for key, value in details.items():
                facts.append({"name": key, "value": str(value)})

        sections = [
            {
                "activityTitle": title,
                "text": message,
                "facts": facts,
                "markdown": True
            }
        ]

        if action_url:
            sections[0]["potentialAction"] = [
                {
                    "@type": "OpenUri",
                    "name": "View Details",
                    "targets": [{"os": "default", "uri": action_url}]
                }
            ]

        return self.send(
            title=title,
            sections=sections,

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

Related Skills