Octopus and Slack integration

Hello team,

I am trying to integrate octopus and slack, so that slack channel receives messages when events have started like deployment status,fail/success. I have configured weebhook details along with notification details however i am confused as to what value goes in the subscriptions->webhook->payload url?

As the current error is from that field as can be seen from the screenshot.


After reading few blogs, I have given the its value as

Can anyone help with exactly what the value should be please.

Thanks,
Pari

Hi @parnithakaleru,

Thanks for reaching out, I’d be happy to help with your Slack Webhook integration!

We have some great documentation for configuring Slack Webhooks with Octopus, along with an example on our Samples instance, and even a youtube video about it!

For the Payload Url value, you will want to use the Webhook URL given after configuring the Slack app to accept incoming connections. This will be the target that will receive the payload and won’t be an Octopus URL:

Let me know how you get on or if you have any questions at all!

Best Regards,

Thank you for your suggestions and links provided.

I have configured by watching the same link on YouTube, However the same error pops up relating to payload url. After more investigation found out that subscriptions need to be enabled as well, which is not in this video.

As per your advice provided correct url, still the deployment fails with same error.
I can send you verbose logs of the deployment if need be, can you let me know what am i missing please.

Regards,
PK

Hi @parnithakaleru,

If you email us (support@octopus.com) the task log and the process JSON, we can take a look over this.
The process JSON can be downloaded from the top right menu:

Regards,
Paul

Hi Paul,

Thanks for looking into it. All sent to support now via email.

Regards,
PK

1 Like

Hey @parnithakaleru,

We got the email thank you, we will continue this conversation there. If it turns out the fix is something generic that would help other users we will post it up here.

If it looks specific to your instance we will allow this forum post to auto close itself off.

Kind Regards,
Clare

1 Like

For other users on this forums benefit Parnitha wanted a slack notification for their project so they used the youtube video we have here which tells you how to setup slack notifications for project deployment notifications.

If you want to setup slack notifications for Octopus Events (not project specific) you need to setup a webhook using the documentation here.

The issue Parnitha had was down to the variable scoping that was set for the variables used to get the Slack URL:

[Notification.Body.Text] = 'xxxxx'
[Notification.Slack.Webhook.Url] = 'xxxxxx'
[Notification.Subject.Text] = 'xxxxx'

Parnitha had the variables scoped to certain environments and targets and it looks like the step they used (Send Slack Deployment message) was running on a specific target. So that target could not see the variables due to the scoping applied:

If you want you can input the webhook URL directly into the step but if you want to use a variable and are hitting this error please check the scoping of that variable.

Kind Regards,
Clare

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.