Incoming Webhooks Integration

Look for the Incoming Webhooks Integration. Click Add.
(remember you are limited to 5 integrations for the free version of
Slack)

Select a channel to post to. (don't worry too much about this you can actually override it later)

Click Add Incoming Webhooks Integration

Nice! They provide some how to information.

Copy the Webhook URL.
For the purposes of this write up I will just list mine as

https://hooks.slack.com/services/XXX

Then run the following curl, as a test (Change the URL to
your own and the name to your own)

> curl -H
"Content-type: application/json" -X POST -d '{"text":
"Patrick
This is a line of text in a channel.\nAnd this is another line of
text."}' https://hooks.slack.com/services/XXX

It worked!

Customizing the name/icon

I want to customize the name/icon. How do you do that?

All you need to do is change the payload. Add username.

{

"username":
"Sensu",

"text": "Patrick This is a line of text in a channel.\nAnd this is
another line of text."

}

Run this curl (replace the URL with your own)

> curl -H
"Content-type: application/json" -X POST -d '{"username": "Sensu",
"text": "Patrick
This is a line of text in a channel.\nAnd this is another line of
text."}' https://hooks.slack.com/services/XXX

That changed the name, now what about the icon?

They have two ways of doing it you can use icon_url or icon_emoji

I am going to use icon_emoji, as I believe I can upload
custom emoji's

{

"username": "Sensu",

"icon_emoji":
":ghost:",

"text": "Patrick This is a line of text in a channel.\nAnd this is
another line of text."

@Ronny - Did you substitute the URL - hooks.slack.com/services/XXX with your actual incoming-webhook endpoint? Once you integrate the Incoming Webhooks with your specific channel they will display a specific Webhook URL that you send the payload to

I see only single URL, hooks.slack.com/services/XXX. I don't see different URL's until and unless I create a different webhooks for each channel. Or update the channel through drop-down list in webhook and not providing any channel while api call.