nocoo/microsoft-teams-send-as-workflow

No description

0 stars0 forksUpdated Jan 23, 2026
npx skills add nocoo/microsoft-teams-send-as-workflow

README

Microsoft Teams Send As Workflow

Send messages and Adaptive Cards to Microsoft Teams channels via Incoming Webhook.

Features

  • 📨 Simple text messages - Quick notifications and alerts
  • 🎴 Adaptive Cards - Rich formatted cards with facts, images, and buttons
  • 🔧 Raw payloads - Full control over custom message structures
  • ⚠️ Helpful error handling - Clear guidance for setup issues

Prerequisites

You need a Webhook URL from Teams. To create one:

  1. In Teams, go to the target channel
  2. Open Workflows app (search from Apps or click three dots below input)
  3. Find template: "Post to a channel when a webhook request is received"
  4. Name the workflow (e.g., "CLI Notification Bot")
  5. Select target Team and Channel
  6. Copy the generated HTTP POST URL

Quick Start

python3 scripts/send_teams.py <WEBHOOK_URL> --text "Hello Teams!"

Message Types

📝 Simple Text Message

python3 scripts/send_teams.py <WEBHOOK_URL> -t "🚀 Deployment completed successfully"

🎴 Adaptive Card

Inline JSON:

python3 scripts/send_teams.py <WEBHOOK_URL> -c '{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.4",
  "body": [
    {
      "type": "TextBlock",
      "text": "Build Report",
      "weight": "Bolder",
      "size": "Medium"
    }
  ]
}'

From JSON file:

python3 scripts/send_teams.py <WEBHOOK_URL> -c card.json

🔧 Raw Payload

python3 scripts/send_teams.py <WEBHOOK_URL> -r '{"type": "message", "text": "Custom"}'

Script Reference

scripts/send_teams.py

ArgumentDescription
webhook_urlTeams Incoming Webhook URL (required positional)
-t, --text TEXTSend simple text message
-c, --card CARDSend Adaptive Card (JSON string or .json file)
-r, --raw RAWSend raw custom payload (JSON string or .json file)
-v, --verboseEnable verbose output

Troubleshooting

⚠️ Workflow Suspended

If you receive errors about a "suspended" workflow:

  1. Open Power Automate (or your org's URL)
  2. Go to My flows / Workflows
  3. Find your workflow → Resume / Activate / Turn on
  4. Retry sending your message

License

MIT License - see LICENSE for details.

Publisher

nocoonocoo

Statistics

Stars0
Forks0
Open Issues0
LicenseMIT License
CreatedJan 23, 2026