- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2021 07:05 PM
I'm facing a issue when I'm writing a flow.
There I need to call a email script in that email script,
URL
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp">click here</a>';
template.print(url);
})(current, template, email, email_action, event);
I need to print this url in flow designer 'Send Email' action.
But when I use that, output shows as below.
Please ${mail_script:URL for service portal} to approve the request.
How can I avoid this and use mail script proper way
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2021 07:33 PM
Hi
you cannot execute Email Scripts at Flow Designer. And to my mind direct creating of emails at Flow Designer is not a good idea because each time something should be modified (recipients, content, layout etc.) you have to modify the Flow and republish it.
Therefore and with respect to your requirement I recommend creating an event from Flow Designer. You can pass the URL as parm1 or parm2 parameter to your platform Email Notification.
How to trigger en event from Flow Designer is described at the following article: https://community.servicenow.com/community?id=community_article&sys_id=3450a52fdbcf2740afc902d5ca961...
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2021 07:33 PM
Hi
you cannot execute Email Scripts at Flow Designer. And to my mind direct creating of emails at Flow Designer is not a good idea because each time something should be modified (recipients, content, layout etc.) you have to modify the Flow and republish it.
Therefore and with respect to your requirement I recommend creating an event from Flow Designer. You can pass the URL as parm1 or parm2 parameter to your platform Email Notification.
How to trigger en event from Flow Designer is described at the following article: https://community.servicenow.com/community?id=community_article&sys_id=3450a52fdbcf2740afc902d5ca961...
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2021 01:33 AM
Hi
Did my reply answer your question?
If so, please mark the appropriate response as "correct" so that the question will appear as resolved for other users who may have a similar question in the future.
If not, please tell me what you are still missing!
Many thanks & kind regards
Maik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2021 09:55 PM
Hi,
You can refer to this thread:
https://community.servicenow.com/community?id=community_question&sys_id=ae2b0be6db020cd85129a851ca961950
Please mark my answer as Correct & Helpful, if applicable.
Thanks
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2022 07:24 AM
Hope nobody minds the thread zombie, but I found this thread reaches to the top of nearly all my flow design searches on community. For this problem in particular I browsed through all the myriad threads discussing the issue, made a video of the solution, and posted it here....