Symhook is incoming webhook of Symphony.
You can integrate with any app which has a notification function or you can write http request in your app and integrate it.
-
Add a Symhook service account to any room in which you want to get notification from an integrated app.
-
Copy the URL and paste it to notification setting page of an app you want to integrate.
*Choose Slack in Type.
e.g.) This is notification setting page in Grafana
-
You can pull Symhook docker image using the following command.
docker pull keitamizuno/symhook
-
Symhook works as a Symphony bot so do what you need to do when you create Symphony bots.
-
Create a service account for Symhook in your Symphony pod.
(reference : https://developers.symphony.com/symphony-developer/docs/create-a-bot-user) -
Paste in RSA public key.
(reference : https://developers.symphony.com/symphony-developer/docs/get-started-with-java#section-create-service-account) -
Create
config.json
.
(reference : https://developers.symphony.com/symphony-developer/docs/configuration-1)*Please overwrite the value of
botPrivateKeyPath
inconfig.json
as"../config/"
.... "botPrivateKeyPath" : "../config/", ...
-
-
Make
config
directory and put yourconfig.json
andrsa-private.key
.mkdir config cp config.json <your-privatekey-name>.pem config
-
Run Symhook
docker run -p 8445:8445 -v /<path-your-config-folder>/config/:/config/ -e FQDN_IP="<mysymhook.com>" keitamizuno/symhook
FQDN_IP
: your symhook's FQDN or IP address.
There are many apps can send a notification message to chat apps by REST API.
In integration or notification setting page of those, you can choose what type of chat (or mail) app to send.
Most of the cases, you can find Slack type (since Slack is the one of most popular chat application) and choose it.
Symhook converts Slack format messages to Symphony format (MessageML Format) and sends the converted message to Symphony pod.
*However, not all of the Slack format are supported. I will add a list of what is supported and not supported.
If you want to integrate apps you created you can just write HTTP requests in your code.
- Header
"Content-Type" : "application/json"
- Body - You can write anything as MessageML Format
"text" : "<Message Text In MessageML Format>"
e.g.)*It doesn't need{ "text" : "<card iconSrc="url" accent="tempo-bg-color--blue"> <header>Card Header. Always visible.</header> <body>Card Body. User must click to view it.</body> </card>" }
<MessageML>
tag.
*You can write a message of Slack format but remember that MessageML Format is much easier for simple notification messages.
Symhook is under MIT license.