Knowledge

Slack Notification

Parameters

Name Description
action Required String The ID of the action.
channel Required String The ID of the Slack channel. More info here.
integration_id Required Integer The ID of the integration.
type Required String The type of the action. Should be set to SLACK.
trigger_time String Specifies when the action should be executed. Can be one of ON_EVERY_EXECUTION, ON_FAILURE or ON_BACK_TO_SUCCESS.
content String The content of the notification.
attachments String[] The array of the Slack message attachments. More info here.

Example

actions:
  - action: "Send notification to deploys channel"
    type: "SLACK"
    content: "[#${execution.id}] ${execution.pipeline.name} execution by <${invoker.html_url}|${invoker.name}>"
    channel: "C0GAADCCL"
    attachments:
    - "{\"fallback\":\"${execution.pipeline.name} execution #${execution.id}\",\"color\":\"good\",\"fields\":[{\"title\":\"Successful execution\",\"value\":\"<${execution.html_url}|Execution #${execution.id} ${execution.comment}>\",\"short\":true},{\"title\":\"Pipeline\",\"value\":\"<${execution.pipeline.html_url}|${execution.pipeline.name}>\",\"short\":true},{\"title\":\"Branch\",\"value\":\"${execution.branch.name}\",\"short\":true},{\"title\":\"Project\",\"value\":\"<${project.html_url}|${project.name}>\",\"short\":true}]}"
    integration_id: 1

Get started now

14 days of unlimited trial. No credit card required.