Syntax for configuring Slack Webhook via circle.yml

slack

#1

Hey I’ve got slack all set up using the “Project Settings” but I really dislike having to use the UI and would prefer to put everything into the .yml file to have it versioned. What is the syntax for setting up slack integration? The standard "notify: webhooks: - url: " style doesn’t seem to be working.

Thanks,
Alex


#2

Same here. Notification to Slack does not work. My circle.yml is:

notify:
  webhooks:
    # notify to Slack
    - url: https://hooks.slack.com/services/some-hash/some-another-hash/some-another-another-hash

Is there anybody who configured webhook notifications from circle.yml?
If I set it from project settings (Chatroom Integrations), then it works.

Thanks,
Valeriy


#3

We also need this in our projects, we cant have a solution that requires manually going to the project settings page in order to add a Slack integration. Either add some logic that checks the url of the webhook and modify the data structure that is being sent(since that is what is causing the error) or allow defining slack-webhooks that are treated properly.

It would also be preferable to be able to specify a channel override since one might not want all projects to post to the same channel and creating new webhooks for each is a waste.


#4

This would be really helpful for my team too. Would be great if the webhook and channel could be specified in circle.yml file


#5

Is there any movement on this? It’s much easier to make changes via YAML and source control than manually in the UI.


#6

I’m also having some trouble with this. I have a Slack integration set up for my project that is working fine, but I created another Slack webhook to post to a different channel, only for builds that have a specific build parameter (nightly builds). Because Circle projects only allow a single webhook to be added, I tried adding the new webhook URL to circle.yml as described in the documentation, but I’m not getting any Slack messages from this webhook.


#7

New to CircleCI here - this totally threw me. I spent a long time trying to understand what was wrong with my circle.yml config.

“webhook returned http status 500, connecting to https://hooks.slack.com/services/…”


#8

This happens to me as well.

“webhook returned http status 500, connecting to [slack url]"


#9

Same HTTP 500 error here. Is it a known bug?


closed #10

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