Skip to content

Send Slack Message Pipeline

Configuring Slack

Follow the first three steps on this page to generate your Slack token and webhook. You will use this information in the workflow.

Adding the Template

GreenOps has a registry of common steps and actions, and has a pre-existing template for sending messages to Slack channels.

Register this as a template in the Templates tab:

Screenshot

Add it to a Pipeline

Now that the step is registered, you can add it to a pipeline.

You probably received a webhook from Slack that looks something like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX. The part matching XXXXXXXXXXXXXXXXXXXXXXXX is a private token, and should be put into a Kubernetes secret using the following command:

kubectl create generic secret slack-secret -n argo --from-literal=token=XXXXXXXXXXXXXXXXXXXXXXXX`

The first part https://hooks.slack.com/services/T00000000/B00000000/ will be used as a parameter when making a workflow.

Here is an example of using the template in a pipeline:

Screenshot

Now you can create the pipeline and run it, and you should see a message appear in Slack.