Slack Integration

After a recent RT training class I was inspired to work on an integration between RT and Slack. We were occasionally having trouble when new tickets would come in and multiple AdminCcs would start replying at roughly the same time. Now we all see new tickets in slack and we quickly see when they’re taken. It’s also a useful starting place for a thread about the ticket.


There is this one as well

We use

which says it’s based off

Hi Josh,

Thank you for writing this. Any chance this was developed to work with RT5?

I’ve been trying to get it working based on the readme file:
https:// github .com/reed-college/slack-rt-linker

However, no such luck.

Under ‘custom action commit code’, I changed these values:

my $slackURL = ‘https://’;
my $rtURL = ‘http:// internal.ip /Ticket/Display.html’;

slack app Bearer token:

my $token = “xoxb-123456”;

my $channel = “”;
if ($queue eq “it”) {
$channel = “C02M1234”;
} elsif ($queue eq “RT-QUEUE2”) {
$channel = “SLACK-CHANNEL-ID2”;
} elsif ($queue eq “RT-QUEUE3”) {
$channel = “SLACK-CHANNEL-ID3”;

I created the app based on the readme file as well.

Any idea what might be going wrong?

I do have it tested and working in both RT 4.4.1 and 5.0.1.

My first guess is that your quotation marks have been transformed into smart-quotes, probably by your texteditor. I don’t know for certain that this is the problem, but it is easy to change and worth the time. I always work to avoid smart quotes because they never actually help anything but sometimes they do cause problems.

You can spot smart quotes due to their angled nature. You can also copy/paste your code into something like BBEdit and use the Character Inspector to select each quotation mark and see it’s Unicode. Your quotes are unicode 201C and 201D (left & right quotatation marks) but you want them to be unicode 0022, which is just a normal quotation mark.

Just in case that isn’t right, here are my other thoughts:

You may want to enable Debug logging (if it isn’t already enabled) and check your log file. Mine lives here: /var/log/user.log but you may also need to look in your RT install directory, for example /opt/rt5/var/log/rt.log

Make sure you’ve created the “slack_timestamp” Custom Field and applied to the same queues you’ve applied the Scrip to.

I’ve installed it several times now and am pretty confident the readme file includes all the important bits. Of course I’m happy to modify that if we find that some steps aren’t clear or I’ve missed something.

Did you found any solution? I am Facing the Same!

Hi Carroll, thanks for reporting. I should probably package this up into a proper extension to be installed via cpan. I’ll try to make that happen soon.