- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 11:58 AM
In Flow Designer, it appears that you cannot use the ${URI} parameter to create a dynamic link to the RITM in a Send Email action. I came across a similar thread, but like with a lot of posts on this site, the links to earlier versions are pretty much dead in all replies more than a year or two old (https://www.servicenow.com/community/developer-forum/how-to-add-link-to-ritm-in-flow-designer-send-m...).
I really would like to find out a way to do this using the Send Email action. The post from Aishwarya_R looks promising, but what I would really like to do is create a reusable Custom Action that I can use that will build the URL needed for the Send Email action.
I am thinking that the Custom Action would have the following information:
- inputs: sys of RITM, RITM number
- output: dynamic URL to RITM
And I really do not want to hard-code the environment into the URL. I would love it to be dynamic, to automatically build in the DEV, TEST, or PRD portion of the URL (instead of having to hard-code it), so it will reflect whatever environment it is being run from.
Is this all possible?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 06:28 AM
I found this link you provided to be most helpful, in allowing me to do what I wanted: https://www.servicenow.com/community/developer-forum/link-to-request-number-in-flow-designer-email-n...
Here is how I created my Custom Action:
Input variables:
Script:
Outputs:
The only minor complaint that I have is it returns the entire URL string, instead of the friendly "RITM" number only link. You cannot use data pills in the URL icon in the Email Editor. But I can live with that. However, if anyone knows of a trick to do it, I would love to hear it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 12:36 PM
Hi @jmiskey,
Is there a reason why you need to use the 'Send Email' action instead of 'Send Notification'?
I think there are a number of limitations to using 'Send Email' such as not being able to use objects such as {URI} you mentioned, and not being able to use email script (not sure on this tho). To me, it looks very static and cannot support various scenarios.
In regards to 'not want to hard-code the environment URL', you can use the following script which would return the URL of the current environment:
gs.getProperty('glide.servlet.uri'); //return https://yourinstance.service-now.com/
Someone created something similar to your requirement, may worth having a read - https://www.servicenow.com/community/now-platform-articles/flow-designer-record-link-generator/ta-p/...
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 01:05 PM
One big advantage to the "Send Email" is that you can just data pills and drag and drop fields from your Catalog Item very easily. In the spirit of "low code" and our citizen developers and new developers, creating dynamic emails, pulling data from the Catalog Item itself is much easier with "Send Email" than it is in developing a generic notification outside the flow, and then using "Send Notification".
I am almost done for the day here, but will dive into those links you provided tomorrow morning.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 06:28 AM
I found this link you provided to be most helpful, in allowing me to do what I wanted: https://www.servicenow.com/community/developer-forum/link-to-request-number-in-flow-designer-email-n...
Here is how I created my Custom Action:
Input variables:
Script:
Outputs:
The only minor complaint that I have is it returns the entire URL string, instead of the friendly "RITM" number only link. You cannot use data pills in the URL icon in the Email Editor. But I can live with that. However, if anyone knows of a trick to do it, I would love to hear it.