slack-webhook

$npx mdskill add vm0-ai/vm0-skills/slack-webhook

Post formatted messages to Slack via webhook

  • Enables agents to send text, links, and rich blocks to Slack
  • Requires a configured Slack webhook URL for message delivery
  • Accepts JSON payloads with text, formatting, or block structures
  • Delivers output directly to Slack channels as formatted posts

SKILL.md

.github/skills/slack-webhookView on GitHub ↗
---
name: slack-webhook
description: Slack Webhook for posting messages. Use when user says "post to Slack",
  "Slack webhook", or "send Slack notification".
---

## Usage

### Simple Message

Write to `/tmp/slack_request.json`:

```json
{
  "text": "Hello, world."
}
```

Then run:

```bash
curl -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @/tmp/slack_request.json
```

### With Formatting

Write to `/tmp/slack_request.json`:

```json
{
  "text": "*Bold* and _italic_ text"
}
```

Then run:

```bash
curl -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @/tmp/slack_request.json
```

### With Link

Write to `/tmp/slack_request.json`:

```json
{
  "text": "Check <https://example.com|this link>"
}
```

Then run:

```bash
curl -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @/tmp/slack_request.json
```

### With Blocks (Rich Layout)

Write to `/tmp/slack_request.json`:

```json
{
  "text": "New review submitted",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Danny left the following review:"
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "<https://example.com|Overlook Hotel>\n:star:\nDoors had too many axe holes."
      }
    }
  ]
}
```

Then run:

```bash
curl -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @/tmp/slack_request.json
```

### With Fields

Write to `/tmp/slack_request.json`:

```json
{
  "text": "Deployment status",
  "blocks": [
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Environment:*\nProduction"
        },
        {
          "type": "mrkdwn",
          "text": "*Status:*\nSuccess"
        }
      ]
    }
  ]
}
```

Then run:

```bash
curl -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @/tmp/slack_request.json
```

## Message Formatting

| Syntax | Result |
|--------|--------|
| `*bold*` | **bold** |
| `_italic_` | _italic_ |
| `~strike~` | ~~strike~~ |
| `` `code` `` | `code` |
| `\n` | newline |
| `<URL\|text>` | hyperlink |
| `:emoji:` | emoji |

## Shell Escaping

Messages with `!` may fail due to shell history expansion. Use heredoc:

```bash
curl -s -X POST $SLACK_WEBHOOK_URL -H "Content-type: application/json" -d @- << 'EOF'
{"text":"Deploy completed! :rocket:"}
EOF
```

## Response

Success: `ok` (HTTP 200)

Errors:
- `invalid_payload` - Malformed JSON
- `no_text` - Missing `text` field
- `no_service` - Webhook disabled or invalid
- `channel_not_found` - Channel deleted
- `channel_is_archived` - Channel archived
- `action_prohibited` - Admin restriction

## Limitations

- One webhook = one channel only
- Cannot override username or icon (set in app config)
- Send only (no reading messages)
- Cannot delete messages after posting
- Rate limit: 1 message/second

For full API access, use the `slack` skill with Bot Token.

## API Reference

- Webhooks Guide: https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks
- Block Kit Builder: https://app.slack.com/block-kit-builder
- Message Formatting: https://docs.slack.dev/messaging/formatting-message-text

More from vm0-ai/vm0-skills

SkillDescription
account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
apifyApify web scraping platform. Use when user mentions "scrape website",
asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
atlassianAtlassian API for Confluence and Jira. Use when user mentions "Confluence
attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".