Reaching Your Global ServiceNow Users: Sending Email Notifications in Their Preferred Language
- nathanlee142
- Mar 20
- 4 min read
Updated: Mar 29

In today's interconnected world, many organizations rely on ServiceNow to streamline their workflows and communicate effectively with users across different geographical locations. A common challenge that arises is ensuring these users receive email notifications in their preferred language. This not only enhances user experience but also improves engagement and reduces potential misunderstandings. If you've been pondering how to achieve this within your ServiceNow instance, you're in the right place. Let's explore some effective strategies to send email notifications in multiple languages based on user preferences.
Understanding the Challenge and Exploring Solutions
The initial thought might be to dynamically translate notification content. While conceptually appealing, this approach often presents technical complexities and might not always guarantee accurate and culturally relevant translations. A more robust and manageable solution involves creating specific notifications for each language your users require. The key then becomes how to intelligently deliver the correct notification to the right user.
Here are two proven methods to tackle this:
1. The Power of Multiple Notifications with Language-Based Filtering
One straightforward and efficient approach is to create multiple versions of the same notification, each tailored to a specific language. Imagine you need to send an email when an incident is assigned to a user. You could create separate notifications titled "Incident Assigned - English," "Incident Assigned - Spanish," and so on.
The magic happens in how these notifications are triggered. Instead of having a single notification respond to an event (like incident.assigned_to_me), you would have each of your language-specific notifications respond to the same event. The crucial element is the condition you set on each notification.
For instance, the "Incident Assigned - English" notification would have a condition similar to:
Assigned to.Language | is | English
Similarly, the "Incident Assigned - Spanish" notification would have:
Assigned to.Language | is | Spanish
This way, when the incident.assigned_to_me event fires, all the language-specific notifications are evaluated. However, only the notification whose condition matches the preferred language setting in the assigned user's profile will actually be sent.
This method offers several advantages:
Simplicity: It avoids complex scripting and relies on ServiceNow's built-in notification filtering capabilities.
Maintainability: Adding support for a new language is as simple as creating a new notification and translating its content.
Clarity: Each notification is clearly labeled, making it easy to manage and understand.
Example Use Case: A global IT support team uses ServiceNow to manage incidents. They have users who prefer to receive notifications in English, French, and Japanese. By implementing this approach, when an incident is assigned to a user with their language preference set to French, they will automatically receive the "Incident Assigned - French" notification.
2. Leveraging gs.getMessage() and a Custom Script Include for Targeted Translations
For scenarios where you prefer to manage translations in a centralized location, you can utilize the gs.getMessage() function in conjunction with a custom script include. This method involves storing your translated text within the sys_ui_message table in ServiceNow.
Here's a breakdown of how this works:
First, you would create a Script Include that mimics the functionality of gs.getMessage() but allows you to specify the target language. This script include would query the sys_ui_message table based on a message key and the provided language, returning the corresponding translated text.
JavaScript
function findMessage(messageKey, messageLanguage) {
var message = (messageKey + '.'); // Useful for debugging
var msg = new GlideRecord('sys_ui_message');
msg.addQuery('language', messageLanguage);
msg.addQuery('key', messageKey);
msg.query();
if (msg.next()) {
return msg.message;
} else {
return message;
}
}
Next, you would modify your Mail Scripts within your email notifications to use this custom findMessage function instead of the standard gs.getMessage(). You would pass the message key and the preferred language of the recipient (typically accessed through current.caller_id.preferred_language or a similar field) to this function.
For example, in a notification script, you might have:
JavaScript
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="5" color="#808080" face="helvetica"><strong>');
template.print(findMessage('Incident has been closed', current.caller_id.preferred_language) + '.');
template.print('</strong></font></p>');
})(current, template, email, email_action, event);
This approach offers these benefits:
Centralized Translation Management: All translations are stored in one place, making it easier to manage and update them.
Consistency: Ensures consistent translations across both email notifications and other parts of your ServiceNow instance that utilize gs.getMessage().
Scalability: Adding new languages involves translating the required messages and importing them into the sys_ui_message table.
Important Considerations: This method is particularly effective when your notifications are primarily directed to a specific user who has a preferred language defined in their profile. It might require more complex logic when dealing with notifications sent to groups or multiple recipients with varying language preferences. In such cases, you might need to iterate through the recipients and trigger individual emails based on their language settings.
Conclusion: Choosing the Right Path for Your Needs
Implementing multilingual email notifications in ServiceNow is crucial for effective communication with a global user base. Both the "multiple notifications with language-based filtering" and the "gs.getMessage() with a custom script include" approaches offer viable solutions, each with its own set of advantages.
To determine the best approach for your organization, consider factors such as:
Number of languages you need to support: For a smaller number of languages, the multiple notification approach might be simpler to manage.
Complexity of your notifications: If your notifications have extensive dynamic content, using gs.getMessage() for specific phrases might be more efficient.
Centralized translation management requirements: If you need a single source of truth for all translations, the gs.getMessage() method is preferable.
By carefully evaluating your specific needs and the strengths of each method, you can effectively implement a system that ensures your ServiceNow users receive email notifications in their preferred language, leading to improved communication and a better overall experience. Remember to thoroughly test your implementation to ensure accuracy and proper delivery in all supported languages.