Outgoing webhooks will send an HTTP POST request to your specified URL when a message matches one or both of the following conditions:
This is useful for providing automated responses to messages your team members post. For example, you might have a service that posts the status of a server. This service could receive the HTTP POST from Slack and automatically respond with a status update.
The outgoing webhook integration is only available in public channels. If you would like to get data out of private groups and DMs in real-time, try a slash command.
Outgoing webhooks are the only kind of custom integration not supported by Slack apps. To build similar functionality in a Slack app, use the Events API.
If a channel is not specified, then the trigger word(s) are required -- otherwise, the trigger word(s) are optional.
If both are specified, then the message must match both conditions.
When a chat message is received that matches the conditions, a POST will be sent to all of the URLs defined like so:
token=XXXXXXXXXXXXXXXXXX
team_id=T0001
team_domain=example
channel_id=C2147483705
channel_name=test
thread_ts=1504640714.003543
timestamp=1504640775.000005
user_id=U2147483697
user_name=Steve
text=googlebot: What is the air-speed velocity of an unladen swallow?
trigger_word=googlebot:
Please note that the content of message attachments will not be included in the outgoing POST data.
If the handler wishes to post a response back into the channel, the following JSON should be returned as the body of the response:
{
"text": "African or European?"
}
Empty bodies or bodies with an empty text property will simply be ignored. Non-200 responses will be retried a reasonable number of times.
Responses will be posted using the bot name and icon configured in the integration. However, if you would like to change the name on a per-response basis, simply include the username parameter in your response.
We rate limit outgoing webhooks at one message per second with some allowances for occasional bursty behavior. Refer to rate limiting in outgoing webhooks for further detail.