Created
August 13, 2021 16:27
-
-
Save ratacibernetica/5655a87e9efd137cf832d51778d3911f to your computer and use it in GitHub Desktop.
send message to Teams via incoming webhook in bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#post-a-message-to-the-webhook-using-curl | |
URL="https://yourllc.webhook.office.com/webhookb2/uuid@tenant/IncomingWebhook/uuid" | |
MSG="$@" | |
# on macOS or Linux | |
curl -H 'Content-Type: application/json' -d "{\"text\": \"$MSG\"}" $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment