You can also use the smart values to send messages directly to any user you can call by smart value! Just add the smart value (plus the @ in front – no angle brackets here) to the "Channel or user" field.
Keeping values up to date
The great thing about Slack IDs is that they follow the user’s handle changes. It’s possible for the handle in Jira to become stale (metadata.slack_username), but since you’re using metadata.slack_id for the actual mention, there’s no problem with this.
You may want to run this script occasionally to catch up with new users in Jira/Slack. Just remember to treat the API tokens with care and not to store them publicly or in code repositories.