Recently I have been searching projects for send messages to Slack Channel, and I found many purposes, but I had choose one, and I’ll show you how to use it. It’s very easy!
-
First, you have to go to your slack team, and click on “Apps & Integrations”.
-
Search and choose “Incoming WebHooks”.
-
Add Configuration: choose a channel, and Add Integration.
-
You will get a Webhook URL.
That’s all that we need, now we going to write the groovy script.
Use the Project and Send Message with Groovy
You can find the original project here github, and you can find the author Ashwanth Kumar by twitter.
-
Create a simple groovy script.
-
Add the project
- Add yout WebHook URL
- Add a simple method from Original Project, with:
-
Run the script as groovy script.groovy
-
Check your message at Slack