Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Latest commit

 

History

History
34 lines (19 loc) · 1.07 KB

README.rst

File metadata and controls

34 lines (19 loc) · 1.07 KB

relay2slack

relay2slack is a tool for capturing and forwarding incoming Slack webhook events.

Installation

To install relay2slack, simply:

$ pip install relay2slack

Configuration is retrieved from environment variables – ensure that SLACK_TOKEN, HTTP_PROXY, and HTTPS_PROXY are all set on your system.

To run relay2slack in the foreground:

$ relay2slack

If you would like to daemonize relay2slack, refer to docs/ for supported methods.

Usage

For whichever service you would like to product webhook events, instead point it to http://localhost:5000/relay with the normal JSON object you expect to send to Slack. For example:

curl -X POST -d 'payload={"channel":"@blaketmiller","username":"My service","icon_emoji":":warning:","text":"Hello world"}' http://localhost:5000/relay

relay2slack receives that request and forwards the posted JSON object onto the actual Slack webhook endpoint that you provide it in the SLACK_TOKEN environment variable.