Built-in Module
slack.notify
Send rich notifications to Slack channels via incoming webhooks. Supports human-in-loop approval flows.
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| webhook_url | string | Yes | Slack incoming webhook URL |
| message | string | Yes | Message text to send |
| channel | string | No | Override the webhook's default channel |
| gitlab_pipeline_url | string | No | GitLab pipeline URL for approval button |
| button_text | string | No | Text on the action button (default: "Review in GitLab") |
Examples
Simple Notification
json
{
"id": "notify",
"type": "slack.notify",
"config": {
"webhook_url": "{{env.SLACK_WEBHOOK_URL}}",
"message": "Deployment to production completed!"
}
}With Channel Override
json
{
"id": "notify_team",
"type": "slack.notify",
"config": {
"webhook_url": "{{env.SLACK_WEBHOOK_URL}}",
"channel": "#deployments",
"message": "Build {{env.CI_COMMIT_SHA}} is ready for review"
}
}Approval Request (Human-in-Loop)
json
{
"id": "request_approval",
"type": "slack.notify",
"pause": true,
"config": {
"webhook_url": "{{env.SLACK_WEBHOOK_URL}}",
"channel": "#deployments",
"message": "Production deployment is ready. Please review and approve.",
"gitlab_pipeline_url": "{{env.CI_SERVER_URL}}/{{env.CI_PROJECT_ID}}/-/pipelines/{{env.CI_PIPELINE_ID}}",
"button_text": "Approve Deployment"
}
}Setup
Create an incoming webhook in Slack:
- 1. Go to your Slack workspace → Apps → Incoming Webhooks
- 2. Create a new webhook and select a channel
- 3. Copy the webhook URL
- 4. Store it as
SLACK_WEBHOOK_URLin your CI environment