slack-api-6-webhooks-and-incoming-messages

Sub-skill of slack-api: 6. Webhooks and Incoming Messages.

5 stars

Best use case

slack-api-6-webhooks-and-incoming-messages is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of slack-api: 6. Webhooks and Incoming Messages.

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

Manual Installation

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

How slack-api-6-webhooks-and-incoming-messages Compares

Feature / Agentslack-api-6-webhooks-and-incoming-messagesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of slack-api: 6. Webhooks and Incoming Messages.

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

# 6. Webhooks and Incoming Messages

## 6. Webhooks and Incoming Messages


```python
# webhooks.py
# ABOUTME: Incoming webhook integration for external services
# ABOUTME: CI/CD notifications, alerts, and external triggers

import requests
import json
from typing import Optional, List, Dict
import hmac
import hashlib
import time

class SlackWebhook:
    """Incoming webhook client for Slack"""

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

    def send(
        self,
        text: str,
        blocks: Optional[List[Dict]] = None,
        attachments: Optional[List[Dict]] = None,
        thread_ts: Optional[str] = None,
        unfurl_links: bool = True,
        unfurl_media: bool = True
    ) -> dict:
        """Send a message via webhook"""

        payload = {
            "text": text,
            "unfurl_links": unfurl_links,
            "unfurl_media": unfurl_media
        }

        if blocks:
            payload["blocks"] = blocks
        if attachments:
            payload["attachments"] = attachments
        if thread_ts:
            payload["thread_ts"] = thread_ts

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

        response.raise_for_status()
        return {"ok": True, "status": response.status_code}

    def send_deployment_notification(
        self,
        app_name: str,
        environment: str,
        version: str,
        status: str,
        commit_sha: str,
        author: str,
        url: Optional[str] = None
    ):
        """Send a deployment notification"""

        color_map = {
            "success": "#36a64f",
            "failure": "#ff0000",
            "started": "#ffcc00",
            "pending": "#808080"
        }

        status_emoji = {
            "success": ":white_check_mark:",
            "failure": ":x:",
            "started": ":rocket:",
            "pending": ":hourglass:"
        }

        blocks = [
            {
                "type": "header",
                "text": {
                    "type": "plain_text",
                    "text": f"{status_emoji.get(status, ':grey_question:')} Deployment {status.title()}: {app_name}",
                    "emoji": True
                }
            },
            {
                "type": "section",
                "fields": [
                    {"type": "mrkdwn", "text": f"*Environment:*\n{environment}"},
                    {"type": "mrkdwn", "text": f"*Version:*\n{version}"},
                    {"type": "mrkdwn", "text": f"*Commit:*\n`{commit_sha[:8]}`"},
                    {"type": "mrkdwn", "text": f"*Author:*\n{author}"}
                ]
            }
        ]

        if url:
            blocks.append({
                "type": "actions",
                "elements": [
                    {
                        "type": "button",
                        "text": {"type": "plain_text", "text": "View Deployment"},
                        "url": url,
                        "style": "primary" if status == "success" else None
                    }
                ]
            })

        attachments = [
            {
                "color": color_map.get(status, "#808080"),
                "blocks": blocks
            }
        ]

        return self.send(
            text=f"Deployment {status}: {app_name} to {environment}",
            attachments=attachments
        )

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

        severity_config = {
            "critical": {"emoji": ":rotating_light:", "color": "#ff0000"},
            "error": {"emoji": ":x:", "color": "#ff4444"},
            "warning": {"emoji": ":warning:", "color": "#ffcc00"},
            "info": {"emoji": ":information_source:", "color": "#0088ff"}
        }

        config = severity_config.get(severity, severity_config["info"])

        blocks = [
            {
                "type": "header",
                "text": {
                    "type": "plain_text",
                    "text": f"{config['emoji']} {title}",
                    "emoji": True
                }
            },
            {
                "type": "section",
                "text": {"type": "mrkdwn", "text": message}
            },
            {
                "type": "context",
                "elements": [
                    {"type": "mrkdwn", "text": f"*Source:* {source} | *Severity:* {severity.upper()}"}
                ]
            }
        ]

        if details:
            detail_text = "\n".join(f"*{k}:* {v}" for k, v in details.items())
            blocks.insert(2, {
                "type": "section",
                "text": {"type": "mrkdwn", "text": detail_text}
            })

        return self.send(
            text=f"[{severity.upper()}] {title}",
            attachments=[{"color": config["color"], "blocks": blocks}]
        )

# Webhook signature verification
def verify_slack_signature(
    signing_secret: str,
    request_body: str,
    timestamp: str,
    signature: str
) -> bool:
    """Verify Slack request signature"""

    # Check timestamp to prevent replay attacks

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

Related Skills

slack-gif-creator

5
from vamseeachanta/workspace-hub

Create custom animated GIFs for Slack reactions and celebrations. Use for team milestones, custom emoji reactions, inside jokes, and workplace fun.

windmill-integration-with-database-and-slack

5
from vamseeachanta/workspace-hub

Sub-skill of windmill: Integration with Database and Slack.

n8n-integration-with-slack-google-sheets-and-email

5
from vamseeachanta/workspace-hub

Sub-skill of n8n: Integration with Slack, Google Sheets, and Email.

github-actions-integration-with-slack-notifications

5
from vamseeachanta/workspace-hub

Sub-skill of github-actions: Integration with Slack Notifications (+1).

activepieces-integration-with-notion-and-slack

5
from vamseeachanta/workspace-hub

Sub-skill of activepieces: Integration with Notion and Slack.

orcaflex-static-debug-common-error-messages

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-static-debug: Common Error Messages.

trello-api-7-webhooks

5
from vamseeachanta/workspace-hub

Sub-skill of trello-api: 7. Webhooks.

todoist-api-8-webhooks

5
from vamseeachanta/workspace-hub

Sub-skill of todoist-api: 8. Webhooks.

notion-api-integration-with-slack

5
from vamseeachanta/workspace-hub

Sub-skill of notion-api: Integration with Slack (+1).

teams-api-3-incoming-webhooks

5
from vamseeachanta/workspace-hub

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

slack-gif-creator-design-guidelines

5
from vamseeachanta/workspace-hub

Sub-skill of slack-gif-creator: Design Guidelines (+2).

slack-gif-creator-dependencies

5
from vamseeachanta/workspace-hub

Sub-skill of slack-gif-creator: Dependencies.