- Create a webhook.
- Generate a JSON payload.
- Place the webhook in a CircleCI environment variable (
SLACK_WEBHOOKby default, but customizable). - Call the orb:
slack-webhook/send-message: json-payload: | { "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "Hello from <https://github.com/adamu|@adamu>'s `slack-webhook` CircleCi orb! 👋" } } ] }
The json-payload argument must always be provided.
There are three ways to provide the webhook URL:
- Via the
SLACK_WEBHOOKenvironment variable. - Via a custom environment variable. Provide the name with the
webhook-url-env-varparameter. - Directly to the
send-messagecommand with thewebhook-urlparameter.
See the full examples on the orb's CircleCI Orb Repository listing.
See the CHANGELOG.