- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2024 11:11 AM
Hi guys,
I must have simply missed something or did it wrong. I created an email template for the brand's standard layout. The template looked good, but when I attached it to the notification I created and tested it, it showed blank in the preview. Does anyone know why?
Notification
Email Template
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 10:20 AM
I was able to fix the blank content issue by using an email script instead. I still don't know why it isn't working to use variables in notification but it's working by using email script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2024 12:57 PM
Hi @bbf35621,
First of all, did you select the right record when you were doing a preview?
Also, I don't believe you can access the ${notification:body} object from an Email template.
You would need to use an Email layout instead - https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/notification...
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2024 02:39 PM
Yes. All in the right table. I created those in the scoped app. I have checked the email logs and it goes triggered and the subject is correct, but the body is blank. I moved the HTML layout from the template to the email layout, result still the same. I have tried to test it just the notification itself, the blank is still showing. Here is a system log preview,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2024 03:17 PM
Right, I would recommend simplifying the notification and testing one step at a time.
For example:
- Start off by removing all the variables, email scripts (if any), and templates from the notification (body and subject). i.e. leave only fixed text in the subject and the body. Preview it, and if it works, move on to the next step.
- Add one variable at a time and perform a preview. If it works, move on to the next step.
- Add the email template and perform a preview.
Is the notification built on the same scope as the table? If not, it may be a scope/access issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2024 10:20 AM
I was able to fix the blank content issue by using an email script instead. I still don't know why it isn't working to use variables in notification but it's working by using email script.