Connecting Jira and Slack in a way that Jira ticket updates can be posted as thread comments on Slac

Bryan Kim January 8, 2024

Hi,

 

We would like to implement a monitoring system for our employees not using Jira - what we want is to be able to create an initial Slack post when a ticket is created, and then post Jira ticket updates (comments, content changes, status change, etc) as individual thread comments of the initial Slack post. As far as I understand, such a thing is not possible with Jira Premium features - finding a specific Slack thread from Jira's point of view, and posting comments of the thread.

 

Do you know if this is possible with Jira Preimum, or could you recommend us some alternatives?

 

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2024

@Bryan Kim , Welcome to the Atlassian Community!

This is possible only integrating Jira with Slack using API REST.

Basically what you need to do is:

  • Create a Slack App and set your permissions
  • Use the Bearer token from Slack APP to connect with Jira by API REST

Inside Jira:

  • Create a custom field to record the Slack thread ID
  • Create an automation rule that works every time an issue is created, then send message for your channel
    • This is your first message for issue
  • Use the web response log to get your thread ID. Generally this is your payload: {{webResponse.body.ts}}
    • This variable you need to pass to fill your custom field created to record your thread ID
  • Just create a second automation rule to everytime an issue is updated and the field that record the thread is not EMPTY, Jira send the message for your Slack Thread created inside your channel for your issue.

You need to know a litle of Slack API and how to manage an Slack APP. This integration does not work for attachment, but for other updates in general you can achieve if you are comfortable with Jira smartvalues.

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2024

Here more context.

This is the first message to send the alert of issue created in your Slack Channel.

Screenshot_165.png

The last action is for edit the field created to record the Slack Thread. The smartvalue used to fill him is: {{webResponse.body.ts}}

 

For the other updates I'm using this example:

Screenshot_166.png

Note that I'm using the custom field ID filled in the first automation to access the thread of the message. I'm passing the thread value as variable on my payload.

These are example of rules you can do, but needs to have some knowledge about Slack and Jira API.

Hope this helps anyway

Bryan Kim January 10, 2024

Hello Fernando,

 

This looks super promising. I am going to give it a shot, and may ask you a couple of questions about the implementation. Thank you so much!

Bryan Kim January 11, 2024

@Fernando Eugênio da Silva Just tried out the solution you showed me, and it works well! Thank you once again. :) 

Paul Benati March 2, 2024

Fernando,

Isn't this essentially what Atlassian's Chat (formerly Assist and Help) does?  Thanks.

 

Paul Benati March 4, 2024

Is there an easy way to modify this to use the Slack channel name instead of ID?  I'm attempting to create a new thread in a Slack channel whose name is based on info in the Jira ticket (i.e., a customer's name).  Jira won't know the channel ID, but it will know the channel name.  Thanks for any thoughts.

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2024

Hey @Paul Benati ,

Yeah, Assist does this, but Assist it's applicable only for Service Projects not for Software projects.

About your second question regarding use Channel Name instead Channel ID. I can't confirm if using REST API you will be able to use Slack Name and collect the thread created. You can confirm this reading Slack API.

But if you want only to send messages for channels using Channel name you can use the resource 'Send Slack Message' and instead use REST API Connection, use Webhook Connection. You can see some details here: https://support.atlassian.com/cloud-automation/docs/use-automation-with-slack/

Using this connection you'll not be able to track thread id if you have plans to update automatically.

 

Tristan Fowler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2024

@Fernando Eugênio da Silva We just set up Assist for our internal teams to track service requests. However, when a request is created in the Requester Channel, the status, requester assignee all shows in the main channel, instead of in the thread. It's visually disruptive. We would rather the main channel only show the requesters question or statement and populate the thread with the specifics about the Jira item.

Here's a screenshot from Atlassian's YouTube video, showing the Jira items in the thread and not on the main page.

Jira status and info in thread.png

However, in our account it does not keep the requesters question in the main channel. Instead, it replaces it with the status, requester, assignee, etc.

Jira status and info in main channel.png

Do we need to enable something in our settings? I didn't see anything in the documentation about this specifically. My guess is we need to enable the "Automatically create issues from messages" setting? Would that be correct? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events