Run an IT help desk in Slack
This guide builds a help desk that people use from Slack. Someone sends the KloudMate bot a direct message describing their problem, and the workflow opens a ticket in your IT project in Jira and replies with a link to it. Anything they reply in that thread is added to the ticket as a comment. When the IT team moves the ticket to Done, the requester gets a message in the same thread.
The requester never has to open Jira, and the IT team works entirely in Jira.
| Workflow | Trigger | What it does |
|---|---|---|
| Open help desk tickets from Slack | Slack New direct message to the bot | Opens a ticket for a new message, or comments on the ticket for a reply in its thread. |
| Tell requesters when their ticket is resolved | Jira Status changed | Replies in the ticket’s Slack thread when it moves to Done. |
The workflows find each other’s data through Storage keys that the first workflow writes for each ticket:
| Key | Holds | Used to |
|---|---|---|
helpdesk-thread:<message timestamp> | The ticket key, such as IT-311 | Find the ticket for a reply in a thread |
helpdesk:<ticket key> | The Slack channel and message timestamp | Find the thread when the ticket is resolved |
Before you start
Section titled “Before you start”- You need the Developer role in a KloudMate workspace whose plan includes workflows.
- You need a Slack connection and a Jira Cloud connection, both with the Workflows capability.
- You need a Jira project for help desk tickets. This guide uses the key
IT. - Each ticket uses workflow credits, and the AI Extract step uses more. See Check workflow usage.
Step 1: Save your Jira address as a variable
Section titled “Step 1: Save your Jira address as a variable”The replies in Slack link to each ticket. Open Workflows → Variables and create a Constant named jira_url, with your Jira site’s address as its value, such as https://acme.atlassian.net. If you followed another guide that uses it, it’s already there.
Step 2: Import the workflows
Section titled “Step 2: Import the workflows”Import each workflow on its own. For each one, open Workflows, click Import, paste the YAML, click Import, and then click Open workflow to set what the import couldn’t.
Open help desk tickets from Slack
Section titled “Open help desk tickets from Slack”After you import it:
- On the trigger, pick your Slack connection under Account.
- On every Slack step, pick your Slack connection.
- On every Jira step, pick your Jira connection and the Site. On Open the ticket, also pick your help desk project and an issue type, such as Task.
Tell requesters when their ticket is resolved
Section titled “Tell requesters when their ticket is resolved”After you import it:
- On the trigger, pick your Jira connection under Account, and pick the Site. If your project key isn’t
IT, change it in Narrow with JQL. - On Reply in the thread, pick your Slack connection.
How the ticket workflow works
Section titled “How the ticket workflow works”The trigger and the requester
Section titled “The trigger and the requester”The New direct message to the bot trigger runs for every message someone sends the bot, including replies in a thread. The bot’s own messages don’t start a run.
A Slack Look Up User step turns {{ trigger.event.user }} into the person’s name and email address, for the ticket’s description and for comments.
A new message or a reply?
Section titled “A new message or a reply?”A Branch checks whether trigger.event.thread_ts is not empty. Slack sets thread_ts only on a reply in a thread, so a new message takes the Else block and becomes a ticket.
Open the ticket
Section titled “Open the ticket”An AI Extract step reads the message and returns a title, a category, and a priority:
Anyone in your Slack workspace can write the message, so the workflow uses AI Extract, which can only return these fields. See AI Extract.
A Jira Create Issue step opens the ticket, with the title as its summary, and the requester and their message in its description. {quote} is Jira’s markup for a quoted block. Its Extra fields add two labels, helpdesk and the category, and set the priority:
Remember the thread and the ticket
Section titled “Remember the thread and the ticket”Storage: Put steps, with Scope set to This workspace, link the Slack message and the ticket in both directions:
helpdesk:{{ steps.create.output.key }}holds the message’s channel and timestamp, as an object:{"channel": "{{ trigger.event.channel }}", "ts": "{{ trigger.event.ts }}"}.helpdesk-thread:{{ trigger.event.ts }}holds the ticket key.
Both keys expire after 90d, so a ticket that stays open longer loses its link to Slack.
The timestamp is stored inside an object on purpose. A Slack timestamp such as 1790800000.000300 looks like a number, and inside an object it stays text, exactly as Slack sent it. Slack needs it character for character to find the thread.
Reply with the ticket
Section titled “Reply with the ticket”A Slack Post Message step replies in a thread on the requester’s message, with Channel set to {{ trigger.event.channel }} and Reply to thread set to {{ trigger.event.ts }}. The reply links to the ticket. The title came from the model, which read text that someone else wrote, so the reply escapes &, <, and > in it, which Slack would otherwise read as special syntax.
Add a reply to the ticket
Section titled “Add a reply to the ticket”For a reply in a thread, a Storage: Get step looks up helpdesk-thread:{{ trigger.event.thread_ts }}, where thread_ts is the timestamp of the message that started the thread. If the thread belongs to a ticket, a Jira Add Comment step adds the reply to the ticket, and a Slack Add Reaction step reacts to the reply with ✅, so the requester knows it arrived. A reply in any other thread is ignored.
How the resolved workflow works
Section titled “How the resolved workflow works”The Jira Status changed trigger runs when an issue moves to another status. Narrow with JQL is project = IT AND status = Done, which limits it to help desk tickets that are now in Done.
The JQL checks the issue’s status when KloudMate looks, not the status the issue moved to. An issue that moved through two statuses between two checks produces an event for each move. So a Branch checks that trigger.event.to.name equals Done, and the workflow replies only once.
A Storage: Get step then looks up helpdesk:{{ trigger.event.issue.key }}. A ticket that someone opened in Jira has no key, so the workflow stops there. For a ticket from Slack, a Slack Post Message step replies in the original thread, with Channel and Reply to thread read from the stored object. Two Storage: Remove steps then delete both keys, since the ticket is done.
Step 3: Test and publish
Section titled “Step 3: Test and publish”- Publish both workflows. The first publish also switches each one on.
- In Slack, send the bot a direct message, such as
My second monitor stopped working. The bot replies with a ticket link within a few seconds. - Reply in that thread. The reply appears as a comment on the ticket, and the bot reacts to it with ✅.
- Move the ticket to Done in Jira. Within a couple of minutes, the bot replies in the thread that it’s resolved.
To see what a run did, open it from Workflows → Runs.
Adapt the workflow
Section titled “Adapt the workflow”- Send urgent requests to a channel. In the ticket workflow, add a Branch after Open the ticket that checks whether
steps.ticket.output.priorityequalsHigh, and posts the ticket in your IT team’s channel. - Use your own categories. Change the
categoryoptions in Read the request. The labels follow automatically. - Reopen instead of starting over. In the resolved workflow’s reply, invite the requester to reply in the thread. Then, in the ticket workflow, add a Jira Transition Issue step after Add the reply to the ticket that moves the ticket back to In Progress, and stop removing the keys in the resolved workflow.