Create a Custom Action in Flow Designer to Create a Dynamic Link to the RITM

jmiskey
Kilo Sage

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

1 ACCEPTED SOLUTION

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:

jmiskey_0-1713360087669.png

 

Script:

jmiskey_1-1713360129205.pngjmiskey_2-1713360172065.pngjmiskey_3-1713360197796.png

 

Outputs:

jmiskey_4-1713360225569.png

 

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.

View solution in original post

5 REPLIES 5

Thanks for that note about ServiceNow interpreting a data pill as HTML @jronquillor. Seeing that gave me an idea and I have another method to share.

 

The URL I was attempting to generate was a simple Fedex tracking number link. To do that, I created a flow variable with the HTML code for the link, then used data pills to grab the tracking number.

DylanBlumenberg_0-1769457313970.png

 

After that, I simply placed the data pill for the variable in the Send Email action. 

DylanBlumenberg_1-1769457367226.png

 

Then in the sent email, it creates the URL as expected!

DylanBlumenberg_2-1769457467859.png