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

Bryan Kim
Contributor
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!

3 answers

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
Contributor
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
Contributor
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
Contributor
March 2, 2024

Fernando,

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

 

Paul Benati
Contributor
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? 

Myra
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!
August 1, 2024

I've tried using {{webResponse.body.ts}} and it doesnt exist as a response in JSM automations. I'm using the same app in FreshService and it seems to fetch the timestamp there. Can there be a reason as to why this is happening @Fernando Eugênio da Silva ? 

0 votes
Chris November 10, 2024

I am going to add, you can use JIRA's own Slack App. As long as an issue is "Created from message" in that thread, it will reply back to it.

 

If not, you can have an automation detect when it's linked an update a thread that way.

Chris November 10, 2024

Atlassian JIRA* that is.

0 votes
William
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!
September 11, 2024

Hi All,

"I just created an account on Jira Service Management and integrated it with Slack. However, I am unable to add the Atlassian Assist app to the 'jira-service-management-cloud' Slack channel. Every time I try, it redirects me to the homepage of Jira Service Management.

(https://www.atlassian.com/software/jira/service-management/help-desk-software-small-business-software)"

Is there someone knows how to install "Atlassian Assist" App to slack channel please?

https://msport-workspace.slack.com/apps/ADBM44F4G-atlassian-assist?utm_source=in-prod&utm_medium=inprod-btn_app_install-index-click&tab=more_info

 

 

Justin Brown November 7, 2024

I'm new to all this. How would I "Create a custom field to record the Slack thread ID"?

I know how to create a custom field but how do i create one that records the Slack channel ID?

Chris November 10, 2024

@William If you're still struggling, there's a "Virtual Assistant" section in the project settings.

 

It will lead you through the process.

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.
November 10, 2024

@Justin Brown ,

To record the Slack Thread ID you just need to use a custom field and use an automation rule to fill the thread ID automatically.

After send your first slack message by API use {{webResponse.body.ts}} to get the thread ID of this message and populate your custom field.

Suggest an answer

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

Atlassian Community Events