{"id":22120966,"url":"https://github.com/actions-ecosystem/action-slack-notifier","last_synced_at":"2025-07-04T07:32:25.573Z","repository":{"id":37834254,"uuid":"262655799","full_name":"actions-ecosystem/action-slack-notifier","owner":"actions-ecosystem","description":"🔔 GitHub Action to send notifications to Slack","archived":false,"fork":false,"pushed_at":"2023-01-19T00:03:19.000Z","size":1335,"stargazers_count":23,"open_issues_count":27,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T14:08:45.381Z","etag":null,"topics":["actions","github","notifications","slack"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/actions-ecosystem-slack-notifier","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions-ecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-09T20:44:54.000Z","updated_at":"2025-03-23T01:31:18.000Z","dependencies_parsed_at":"2023-02-10T19:01:41.275Z","dependency_job_id":null,"html_url":"https://github.com/actions-ecosystem/action-slack-notifier","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.5625,"last_synced_commit":"fc778468d09c43a6f4d1b8cccaca59766656996a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/actions-ecosystem/action-slack-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-slack-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-slack-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-slack-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-slack-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-ecosystem","download_url":"https://codeload.github.com/actions-ecosystem/action-slack-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-slack-notifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262788708,"owners_count":23364396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github","notifications","slack"],"created_at":"2024-12-01T14:31:50.578Z","updated_at":"2025-07-04T07:32:25.534Z","avatar_url":"https://github.com/actions-ecosystem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Action Slack Notifier\n\n[![actions-workflow-test][actions-workflow-test-badge]][actions-workflow-test]\n[![release][release-badge]][release]\n[![license][license-badge]][license]\n\n![screenshot](./docs/assets/screenshot-pull-request.png)\n\nThis is a GitHub Action to send notifications to Slack on general purpose.\n\nThis action is designed to focus on sending notifications, so you can flexibly customize your workflow with this action.\nFor example, sending a message to you when a job status changes, you get a comment in an issue, a label is added to your pull request, and so on.\n\nIt would be more useful to use this with other GitHub Actions' outputs.\n\n## Prerequisites\n\nBefore getting started, let's create a Slack app!\n\nThis action requires the permission `chat:write` or optionally `chat:write.customize`.\nIf you want to change the icon for a message, choose `chat:write.customize`.\n\nIf you're not familiar with creating a Slack app, see the guide below.\n\n\u003cdetails\u003e\n\u003csummary\u003eSlack App Setup\u003c/summary\u003e\n\n1. Create a Slack app\n\nVisit https://api.slack.com/apps and then create an app in your workspace.\n\n![screenshot](./docs/assets/screenshot-slack-create-app.png)\n\n2. Add a permission to the app\n\nVisit `https://api.slack.com/apps/\u003cYOUR_APP_ID\u003e/oauth` and then add a permission to your app.\n\n![screenshot](./docs/assets/screenshot-slack-add-permission.png)\n\n3. Install the app\n\nVisit `https://api.slack.com/apps/\u003cYOUR_APP_ID\u003e/install-on-team` and then install your app in your workspace.\n\n![screenshot](./docs/assets/screenshot-slack-install-app.png)\n\n4. Add the app to a channel\n\nOpen a Slack channel and add the app.\n\n\u003c/details\u003e\n\n## Inputs\n\n|       NAME       |                                                                              DESCRIPTION                                                                               |   TYPE   | REQUIRED |     DEFAULT      |\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------|------------------|\n| `slack_token`    | A Slack token.                                                                                                                                                         | `string` | `true`   | `N/A`            |\n| `channel`        | A channel that will receives the message. e.g.) `develop`, `#develop`                                                                                                  | `string` | `true`   | `N/A`            |\n| `message`        | A message for the channel. Supports Markdown format.                                                                                                                   | `string` | `true`   | `N/A`            |\n| `username`       | An username who sends a message.                                                                                                                                       | `string` | `false`  | `GitHub Actions` |\n| `color`          | A color of a message. The color names {black, red, green, yellow, blue, magenta, cyan, white} and color code (e.g., `#4CAF50`) are available. The default is no-color. | `string` | `false`  | `N/A`            |\n| `verbose`        | Whether message contains GitHub context: repository, ref, workflow, event, action, number                                                                              | `bool`   | `false`  | `false`          |\n| `unfurl`         | Whether to unfurl links and media in a message.                                                                                                                        | `bool`   | `false`  | `true`           |\n| `custom_payload` | A custom payload, in the form of JSON of a Slack block array, overriding the whole message. If this is specified, `inputs.color` and `inputs.verbose` are ignored.     | `string` | `false`  | `N/A`            |\n\n`inputs.custom_payload` allows advanced users to send *any* form of message.\n[Block Kit Builder](https://api.slack.com/tools/block-kit-builder) helps you to build a JSON payload for this.\n\n### Behaviors\n\n#### `color: green` `verbose: true`\n\n![screenshot](./docs/assets/screenshot-color-verbose.png)\n\n#### `color: ''` `verbose: true`\n\n![screenshot](./docs/assets/screenshot-verbose-no-color.png)\n\n#### `color: green` `verbose: false`\n\n![screenshot](./docs/assets/screenshot-color-no-verbose.png)\n\n#### `color: ''` `verbose: false`\n\n![screenshot](./docs/assets/screenshot-no-color-no-verbose.png)\n\n## Color Palettes\n\n\u003cdetails\u003e\n\u003csummary\u003eBlack\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-black.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRed\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-red.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGreen\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-green.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eYellow\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-yellow.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eBlue\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-blue.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMagenta\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-magenta.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCyan\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-cyan.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWhite\u003c/summary\u003e\n\n![screenshot](./docs/assets/screenshot-color-white.png)\n\n\u003c/details\u003e\n\n## Example\n\n### Simple\n\n```yaml\nname: Notify push\n\non: push\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          message: |\n            @${{ github.actor }} pushed commits.\n          channel: develop\n```\n\n### Send a notification when the previous job fails\n\n![screenshot](./docs/assets/screenshot-example-failure.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Test\n\non: push\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v1\n        with:\n          node-version: \"12.x\"\n      - run: yarn install\n      - run: yarn test\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        if: ${{ failure() }}\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          message: |\n            @${{ github.actor }} test failed.\n          channel: develop\n          color: red # optional\n          verbose: true # optional\n```\n\n\u003c/details\u003e\n\n### Propagate mentions from GitHub to Slack\n\n![screenshot](./docs/assets/screenshot-example-mention-github.png)\n![screenshot](./docs/assets/screenshot-example-mention-slack.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Propagate Mentions\n\non:\n  issue_comment:\n    types:\n      - created\n\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions-ecosystem/action-regex-match@v2\n        id: regex-match\n        with:\n          regex: '^\\/cc(( +@[-\\w]+)+)\\s*$'\n          text: ${{ github.event.comment.body }}\n          flags: 'gm'\n\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        if: ${{ steps.regex-match.outputs.match != '' }}\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          message: |\n            ${{ steps.regex-match.outputs.match }}\n          channel: develop\n          color: blue # optional\n          verbose: true # optional\n```\n\n\u003c/details\u003e\n\n### Send a notification when a specific label is added\n\n![screenshot](./docs/assets/screenshot-example-labeled.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Notify Labeled\n\non:\n  issues:\n    types:\n      - labeled\n\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        if: ${{ github.event.label.name == 'help wanted' }}\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          message: |\n            `${{ github.event.label.name }}` label has been added.\n          channel: develop\n          color: blue # optional\n          verbose: true # optional\n```\n\n\u003c/details\u003e\n\n### Send a custom payload\n\n![screenshot](./docs/assets/screenshot-example-custom-payload.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Send Custom Payload\n\non: push\n\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          channel: develop\n          message: 'This text is for notifications.'\n          custom_payload: |\n            {\n              \"blocks\": [\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"mrkdwn\",\n                    \"text\": \"\u003e message *with some bold text* and _some italicized text_.\"\n                  }\n                },\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"mrkdwn\",\n                    \"text\": \"This is a mrkdwn section block :ghost: *this is bold*, and ~this is crossed out~, and \u003chttps://google.com|this is a link\u003e\"\n                  }\n                },\n                {\n                  \"type\": \"section\",\n                  \"text\": {\n                    \"type\": \"plain_text\",\n                    \"text\": \"This is a plain text section block.\",\n                    \"emoji\": true\n                  }\n                },\n                {\n                  \"type\": \"context\",\n                  \"elements\": [\n                    {\n                      \"type\": \"mrkdwn\",\n                      \"text\": \"For more info, contact \u003csupport@acme.inc\u003e\"\n                    }\n                  ]\n                }\n              ]\n            }\n```\n\n\u003c/details\u003e\n\n## License\n\nCopyright 2020 The Actions Ecosystem Authors.\n\nAction Slack Notifier is released under the [Apache License 2.0](./LICENSE).\n\n\u003c!-- badge links --\u003e\n\n[actions-workflow-test]: https://github.com/actions-ecosystem/action-slack-notifier/actions?query=workflow%3ATest\n[actions-workflow-test-badge]: https://img.shields.io/github/workflow/status/actions-ecosystem/action-slack-notifier/Test?label=Test\u0026style=for-the-badge\u0026logo=github\n\n[release]: https://github.com/actions-ecosystem/action-slack-notifier/releases\n[release-badge]: https://img.shields.io/github/v/release/actions-ecosystem/action-slack-notifier?style=for-the-badge\u0026logo=github\n\n[license]: LICENSE\n[license-badge]: https://img.shields.io/github/license/actions-ecosystem/action-slack-notifier?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Faction-slack-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-ecosystem%2Faction-slack-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Faction-slack-notifier/lists"}