Post Ticket Events to Slack Channels

Robert Ullrich19. Sep 2018 | Case studyConsultingCyber SecurityUse cases

During my vacation, I thought about new integration use cases I can show you. Because I’m also evaluating Phantom at the moment and was invited to join their Slack community, I thought this would be a nice use case. So let’s start with our “SlackConnector”.

Like in former blog posts, there are several requirements for this HowTo:

  • running OTRS 6.0.x system
  • a valid Slack workspace

Prepare Slack for the integration

Follow the instructions and create a new incoming webhook.

Configure the SlackConnector on OTRS side

At first, we’ve to create the new web service.

SlackConnector General config

Afterward, we need a new invoker. Attached you’ll find the first part of my config:

SlackConnector Invoker Config 1

The most important part is (as always) the XSLT mapping. The following example is tested and working:

SlackConnector XSLT mapping

Here’s the XSL stylesheet:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="" version="2.0">
<xsl:output method="xml" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />

<xsl:template match="RootElement">
<text>New Ticket [Ticket#<xsl:value-of select="//TicketNumber"/>] created!
Title: <xsl:value-of select="//Ticket/Title"/>
Priority: <xsl:value-of select="//Ticket/Priority"/>
<title>;TicketID=<xsl:value-of select="//TicketID"/></title>
<title_link>;TicketID=<xsl:value-of select="//TicketID"/></title_link>
<text>Go to ticket to see more information!</text>

The last part for the invoker is the used event trigger. Because I want to inform my Slack users every time when a new ticket is created, I’m using the “TicketCreate” event without any event filters:

SlackConnector Invoker Config 2

That’s all for the invoker configuration. The next part is the configuration of the transport. I’m using a small workaround to make the integration possible. My Slack token is “T0X829D7E/BBYH0BEE4/nAFuXxXxXxXxXxXxXxXxXxX2”.  I’ve added the first part until the “/” to my endpoint address and the second part including the “/” I added to the controller mapping. Don’t forget to set “POST” as request command.

SlackConnector Transport Config

Apply all changes. Congratulations! You’re done with the invoker.

Test the SlackConnector

Let’s test our new web service. Create a new ticket and see if the invoker is triggered:

SlackConnector Ticket


The output in the OTRS debugger should look like the following:

SlackConnector Debugger

Because of the received JSON data from Slack, we should also see the message now in our Slack channel

SlackConnector Slack

More information about the Slack REST API

You can also use other resources which are provided by the Slack REST API.

Please go to the following website, if you need more information:

Jens Bothe at 23.07.2019, 15:26

Commercial version is required for invokers

Nate at 18.07.2019, 21:02

Same as previous poster. Can we get some clarification on how to do this in the community edition please?

Davide at 27.03.2019, 12:57

Hi, the invokers requires extra features which are available only in the Business Edition? I´m trying to set the SlackConnector but the invoker field is not editable (I can´t add invokers). Thank, Davide

Tapash Raha at 01.03.2019, 12:02

Hi, Unable to create invoker in Community edition. The option to create invoker is disable. Could you please confirm that the option is not available due to community version?

Your email address will not be published. Required fields are marked *