- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 05:13 AM
I want to send an email which has a table in it,
Like Sl.no task description
1 TASK001 abcd
2 TASK002 xyz
How can i achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 08:10 AM
Hello Swathi,
It's my mistake that I didn't give attention that you needed it via workflow.
So, in that case my suggestion would be, creating a new event from the registry and add an Event activity in the workflow and provide the name of the Event there.
After that, from the Email->create a Notification and trigger it when the event is fired with the particular event name.
Like,
And, in the Notification body, you can include which I posted previously:
Also, you can specify the recipients from here itself.
I hope this would solve your requirement more easily rather writing a long piece of mail script and then including it in the mail body.
Please hit Like or mark Helpful or Correct based on the impact.
Thanks,
Rajshekhar Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 06:38 AM
If you need static data, then you dont require any scripting.
Just add a table in the HTML Message editor of notification and add the required content in each of its cell.
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 07:04 AM
in workflow notification there is no HTML editor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 07:07 AM
Hi Swathi,
In workflow in email notification activity you can add the code within <mail_script> tag
<mail_script>
template.print('<tr>');
template.print('<th>Sr No</th>');
template.print('<th>Task</th>');
template.print('<th>Description</th>');
template.print('</tr>');
template.print('<tr>');
template.print('<td>1</td>');
template.print('<td>TASK001</td>');
template.print('<td>abcd</td>');
template.print('</tr>');
template.print('<tr>');
template.print('<td>2</td>');
template.print('<td>TASK002</td>');
template.print('<td>xyz</td>');
template.print('</tr>');
</mail_script>
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 07:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 07:11 AM
Hi Rajshekhar,
This would work when email notification is being used. But Swathi is using workflow email notification activity so this cannot be used
Any way this will work for when email notification is used.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader