How to limit character count from Jira field when sending automated emails

Hi everyone! I have a Jira automation rule that sends emails to our Teams channel whenever someone creates a new ticket. The email includes various smart values to give the team quick info about the issue.

My problem is with the description field. When the description gets too long, it messes up the entire email format and breaks the links. I need to find a way to truncate the description field to maybe 200 characters or so before it gets included in the email.

Does anyone know how to limit the number of characters from a specific field in Jira automation emails? Any help would be great!

you can also try {{issue.description.plainText.substring(0,200)}} - it strips formatting first, then cuts the text. saved me so many headaches when people paste html or random characters that mess up email layouts. way cleaner than just using substring.

We did something similar for our support team last year. Use {{issue.description.truncate(200)}} instead of substring - it’s way better at handling word boundaries and won’t cut words in half. You can also wrap it in {{#if}} statements to only show descriptions that actually exist and aren’t empty. Saves you from having blank sections when people submit tickets without descriptions. Truncate’s been rock solid in production for us, especially with special characters and copy-pasted formatting that usually breaks substring.

Had this same problem six months ago with our incident reporting workflow. Fixed it using the substring function in smart value syntax. Just swap {{issue.description}} with {{issue.description.substring(0,200)}} in your email template - cuts the description at 200 characters exactly. Want it to look cleaner? Add {{issue.description.substring(0,200)}}... so people know there’s more text. Heads up though - it’ll cut mid-word sometimes, so play around with the character count until it works for your team’s usual description lengths. The formatting issues will go away once you add this truncation.