Is it possible to send a text snippet from Automation for JIRA into a slack channel?
Use Case: we are trying to send notifications when a certain team is flagged in a ticket. The notifications are working, but the descriptions for some issues can be quite verbose. I would like a way to send a specific section of the message in a collapsible section, like a text snippet, so all the main details are available "at a glance" but the long details do not fill the screen and hide the headline details.
Any ideas?
Please note that I've taken assistance from GenAI tools to update this response.
Use Slack's "blocks" format to structure the message.
Use a "section" block for high-level details.
Use a "context" block or "fields" to add metadata.
Use a "divider" to separate sections.
Use a "blockquote" (>
) or "code block" (```
) for the detailed description.
Trigger: When a ticket is flagged for a specific team.
Action: Send message to Slack using "Send Slack message" action.
Slack Message Format (JSON Payload in Advanced Mode)
Main details (Issue Key, Summary, Priority, Status)
These are visible at a glance.
Key Details
If you have a specific section of the description (like a summary field), you can extract it.
Collapsible Section
The full description is enclosed in a code block (```
) so it takes less space and can be expanded in Slack.
Modify the below JSON to match your Jira fields.
Use "Advanced" mode in Jira Automation's Send Slack message action.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*🚩 Flagged Ticket Alert!*\n*<${issue.url}|${issue.key} - ${issue.summary}>*"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Priority:* ${issue.priority} | *Status:* ${issue.status}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*📌 Key Details:*\n${issue.customfield_12345}" // Replace with the field ID for your custom summary
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*💬 Full Description (click to expand):*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "``` ${issue.description} ```"
}
}
]
}
@Jitin Chugh Thanks for the reply!
A couple points of clarification, I do not see anywhere to convert the "Slack Message Format" to a JSON payload in the Slack component, is the intent to use a web callout here?
Secondly, still fiddling with the syntax in the Web Callout, its giving me a bad request when I try to send it as a web callout.
Am I missing something in your reply? Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.