Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to insert hyperlinks, HTML code, etc. via Flow Designer?

davida1
Giga Expert

I'm trying to create a function via Flow Designer such that an incident is generated when something (a group, in this case) expires. Our homegrown group maintenance system expires things after a year, and in spite of numerous (9) notices, group owners/managers still let their groups expire. To mitigate this, we decided to load the expiration date into the Groups table, and have a flow trigger when that date passes. It generates an incident assigned to the expired group, with information on what to do whether they wish to keep it (likely) or not. 

I ran into a snag when I tried inserting into the 'Additional comments' field a hyperlink to the knowledge base article on using the homegrown system. No matter how I enter the URL code, it's partially erased either when I hit 'Enter' or when I click 'Save' on the flow. A URL that looks like:

<a href="https://umd.service-now.com/itsc?id=kb_article&article=KB0011206">

turns into this:

<a href="https://umd.service-now.com/itsc?id

I've tried following tips from "Formatting within Journal fields using HTML & [code]" (https://community.servicenow.com/community?id=community_blog&sys_id=4d9ceae1dbd0dbc01dcaf3231f9619e1). I've got an open incident with HI, but other than direct me to the page above they're still looking into it.

I can put hyperlinks into 'Additional comments' directly, but not via Flow Designer. Anyone had any better luck?

David A
davida@umd.edu

16 REPLIES 16

Ankush Jangle1
Kilo Guru

Hi Davida,

First Way :-

    In Utilities-->you will get The Option Email

   In Email Body Part you can write the Hyper link code

 <a href="www.gmail.com">Test Link</a> 

 

Second Way:-

you have available option in Email Insert/edit Link

In Url You can Pass the URL

In Text To Display Pass  the name of Url 

find_real_file.png

Please Mark It as Helpful

Thanks

ANkush Jangale

itpro72
Tera Contributor

I stumbled upon a solution I thought I'd share specifically if you're looking to link to a table record. This won't work for other types of hyperlinks. There is an action under Alert Management Content to generate a hyperlink to a table record.

find_real_file.png

That brings you to the form that allows you to set the table, record and name from data in the workflow.

find_real_file.png

Now you can reference the hyperlink just as you would any other data in your workflow.

find_real_file.png

In this case you wanted to insert it into additional comments and it worked flawlessly for me.

find_real_file.png

Hope you find this helpful.

It does work, but unfortunately wraps [code][/code] around the link and the tags are visible in an email body 😕

sg28
Tera Contributor

Hi, 

I have the same requirement. but I am not getting the "alert management content"  so not getting "generate link to table record" action. Can you please help.

itpro72
Tera Contributor

I noted after I posted that Alert Management Content is available only with a subscription application. I meant to go back and publish an article with a solution and you have prompted me to do so. Hyperlinks in flow designer contains instruction for a custom action that borrowed from (and improved upon) the action I mentioned above.