Send messages to Microsoft Teams chat via Power Automate webhook.
Designed as a CLI bridge for AI agents (e.g. Claude Code) that can read Teams messages but can't reply directly.
In Microsoft Teams, open the chat or channel where you want to receive messages, then:
- Click "+" (Manage apps) or "..." → "Workflows"
- Search for and select the "Post to a channel when a webhook request is received" template
- For group chats, use "Send a webhook alert to a chat" (將 Webhook 警示傳送至聊天)
- Follow the prompts to create the workflow
- Copy the generated webhook URL (it will include a
sigparameter for authentication)
From GitHub:
npm install -g github:bensonbs/teams-reply-cliOr from a local clone:
git clone https://github.com/bensonbs/teams-reply-cli.git
npm install -g ./teams-reply-cliexport TEAMS_WEBHOOK_URL='https://your-webhook-url-here'teams-reply "Hello, this is a message from CLI"Add to your settings.json to allow Claude to reply to Teams:
{
"env": {
"TEAMS_WEBHOOK_URL": "https://your-webhook-url-here"
}
}Then Claude can send messages via:
teams-reply "Reply content here"- Node.js >= 18 (uses built-in
fetch) - A Power Automate webhook URL from Microsoft Teams
MIT