Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get slack channel ID from "Create Slack channel for incident"

Nick
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!
March 6, 2024

When I use the Create Slack channel for incident action, is there a way to get the channel ID later on in the automation? It does not appear to be available in the issue as a field from what I can tell.

1 answer

0 votes
matthew_hickman
November 18, 2025

Hi Nick,

 

I’ve found my own solution as I needed a solution to archive a channel once an incident was transitioned to Closed and needed the channel ID

 

So using “Create Slack Channel for an Incident” doesn’t allow to to get the Channel ID so what I’ve done is using:

 

Sent webrequest to:

POST https://slack.com/api/conversations.create

with a payload of :

 

{{{
"name": "major-incident-issue.key.toLowerCase()",
"is_private": false
}}}

Then create a variable of webResponse.body.channel.id and update a custom field (simple text) with the variable value.

At this point I have a new channel and a custom field with the channel ID for later use

 

However there are no new members so I’ve used another webrequest to get the assignee:

 

GET https://slack.com/api/users.lookupByEmail?email=\{{issue.assignee.emailAddress }}

This gets me the slack user Id, then add that to an assignee variable

I then then another webrequest

 

POST https://slack.com/api/conversations.invite

This a payload of:

 

{{{
"channel": "createdChannel",
"users": "assigneeResponse"
}}}

I then repeat the process for Team Lead in the event that there is no assignee.

 

Finally a rule that on Transition to Closed archives the channel:

 

POST https://slack.com/api/conversations.archive

and payload:

 

{{{
"channel": "issue.customfield_11069"
}}}

This archives the channel and the process is complete.

 

Regards

 

Matt

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events