Slack Integration using Octopus Subscription Error

Currently, we are trying to configure Octopus Subscriptions to send events to our slack channel. We use our slack app webhook url that we paste in the Octopus Subscription payload url to setup octopus events being sent to our slack channel.

When running the task the Octopus Subscription is configured to send events on we are running into this error

Failed to send webhook request. Webhook https://hooks.slack.com/services/A02QFD1M3/B04Q13CSTM0/97rpWqD3bcvm9WgpkgojtLko (Events-2282925) failed, with a status of BadRequest.
Octopus.Shared.ControlledFailureException: Webhook https://hooks.slack.com/services/A02QFD1M3/B04Q13CSTM0/97rpWqD3bcvm9WgpkgojtLko (Events-2282925) failed, with a status of BadRequest.
   at Octopus.Server.Orchestration.ServerTasks.ProcessSubscriptions.EventNotifications.WebhookNotificationProcessor.SendWebhookNotifications(ITaskLog taskLog, HttpClient httpClient, Subscription subscription, Team team, IReadOnlyCollection`1 events, DateTimeOffset lastProcessed, DateTimeOffset processingDate, ServerConfiguration serverConfiguration, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/ServerTasks/ProcessSubscriptions/EventNotifications/WebhookNotificationProcessor.cs:line 222
   at Octopus.Server.Orchestration.ServerTasks.ProcessSubscriptions.EventNotifications.WebhookNotificationProcessor.<>c__DisplayClass9_0.<<SendWebhookNotificationsWithRetry>b__0>d.MoveNext() in ./source/Octopus.Server/Orchestration/ServerTasks/ProcessSubscriptions/EventNotifications/WebhookNotificationProcessor.cs:line 155
--- End of stack trace from previous location ---
   at Nevermore.Transient.RetryPolicy.<>c__DisplayClass28_0.<<ExecuteActionAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Nevermore.Transient.RetryPolicy.ExecuteActionAsync[TResult](Func`1 func)
   at Octopus.Server.Orchestration.ServerTasks.ProcessSubscriptions.EventNotifications.WebhookNotificationProcessor.SendWebhookNotificationsWithRetry(ITaskLog taskLog, HttpClient httpClient, Subscription subscription, Team team, IReadOnlyCollection`1 events, DateTimeOffset lastProcessed, DateTimeOffset processingDate, ServerConfiguration serverConfiguration, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/ServerTasks/ProcessSubscriptions/EventNotifications/WebhookNotificationProcessor.cs:line 165
   at Octopus.Server.Orchestration.ServerTasks.ProcessSubscriptions.EventNotifications.WebhookNotificationProcessor.ProcessWebhookNotifications(ITaskLog taskLog, IOctopusQueryExecutor queryExecutor, Subscription subscription, List`1 events, DateTimeOffset lastProcessed, DateTimeOffset processingDate, ServerConfiguration serverConfiguration, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/ServerTasks/ProcessSubscriptions/EventNotifications/WebhookNotificationProcessor.cs:line 115
Octopus.Server version 2022.4.8394 (2022.4.8394)

Were wondering why this is happening, do we need to use a 3rd party app mentioned here first to receive Octopus events in our slack channel?

Hi @tcochran,

Thanks for reaching out to Octopus Support, and I’m sorry you’re experiencing issues attempting to send your Subscription notifications to Slack.

Unfortunately, at this time, you do still need to use a 3rd party tool to consume the webhook request from Octopus. We have some documentation on setting this up with an Azure Function App. I have used Zapier to process my Subscription notifications in the past, which works really well.

Sorry, I don’t have better news for you on this front. Please let me know if you have any other questions we can help with.

Thanks!
Dan

1 Like

Thanks for the response,

Sounds good I will look to use Azure Function App or another 3rd party tool.

1 Like

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