Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Getting TestRail notifications to Slack


Hi Jose,

We currently don’t have an estimate/expected release date and we would like to offer a more generic feature (e.g. web hooks) at some point which would also support Slack and other integrations.



Would also love to have webhooks and Slack integration from TestRail!


Thanks for your feedback, James!



I have written code that does exactly this feature in Ruby,

The code is in an infancy state because I ripped it from a much larger bot that I am building. In order to run this ruby script I suggest you take it an adapt it to a fully fledged bot. However you can run it as is and it will work provided you make the necessary changes in the file to hook into your companies email server and so on. Then point test rail to where the script is and everything should work as is.

Install instructions for linux host:

  1. Install Ruby 2.3.1 as a service user on the TestRail server (or another server but update the start address to
  2. Make a directory called testrail_interceptor
  3. Install bundler
  4. type the command bundle init
  5. put the file from the url in that directory
  6. add the following gems to the Gemfile
gem 'midi-smtp-server'
gem 'mail'
gem 'slack-ruby-client'
gem 'faye-websocket'

Now run bundle install and follow that by running ruby ./bot.rb. Make sure you made the necessary configuration options in the file. Read the comments in the file to get a grip of where to change what. Finally apologies for the not so great code as I said before these are just the bits and bobs needed to run ripped from a much larger bot I am building and I do recommend just extracting the code and adapting it to your own bot.


Hi Michael,

Thanks for sharing this :slight_smile: I assume this handles notifications via emails and then forwards the message to Slack, is this correct?



Hey @tgurock,

Yes when it receives an email it extracts the subject line out, extracts who its supposed to go to, and extracts the url. Then once it has that information it queries slack for the user with the same email, sends them a private message with the subject line followed by the URL to the assignment, then takes the email and forwards it onto the original email server. (provided that whom ever is setting the script up supplies all the necessary information.) This way it gives you the best of both worlds you get the original email and a slack notification.

No tampering is done to the email as it is kept intact and stored in a variable with no transformations applied.


Hi Michael,

That’s great, thanks!



Can’t wait for this integration -+1 for me as well!


Thanks for your feedback, Ozz!



+1 for slack integration


Hi Vasily,

Thanks for your feedback! I’ve added your vote to the request as well.



Slack 4ever,
+1 for this feature


Hey Volodia,
I have added your vote.


+1 for this feature.



Thanks for your feedback, vote added!





Thanks Faisal, vote added!




+1 for slack integration


Thanks for your feedback, Evgeniia!



+1 for Slack Integration, please!