Skip to main content

How to get hyperlink column value in the Send email body content? I have tried using column reference, workflow variable and build string option but I am unable to get it.

 

Hi,



I looked into this issue and this is what I found.



In an email if I added the item property of a hyperlink column and emailed it I saw :



{"__metadata":{"type":"SP.FieldUrlValue"},"Description":"http://nintex.com","Url":"http://nintex.com"}


Which I straight away recognised as JSON.



I did a quick search on this community site and found many posts but this one helped me : https://community.nintex.com/t5/Nintex-for-SharePoint/Data-with-escaped-double-quotes-from-JSON-response-parsed-as-a/m-p/93884



 



As per the guide I used a regular expression to pull the URL from the JSON.



(?<="Url":")([^"]*)


I then use a "for each" action to extract the url out of the collection variable and put it into a text variable.  I know there are other actions to do this but I find the "for each" does it the cleanest.



Unfortunatley escape characters are added when the text is added to the collection variable in the Regular Expression and it comes out like below after its put through the "For Each" action



http://nintex.com


 Next just use a "Replace Substring in string" action to get rid of the back slashes



 



You can use the resulting variable in your email.  In the body click the add link button from the ribbon.  For the url insert the text variable that came out of the build string.  Add Text if required.



Click insert and send.



 


Thanks Simon for your reply.



I found easy way to get actual link. While adding the current item value we have options like insert as a string/URL. I have selected URL and inserted so I got exact link from hyperlink column.


Reply