ServiceNow introduction to Email Watermark | ServiceNow Notification GlideEmailWatermark API demo
[Music] hi all and welcome back to another tutorial so in today's tutorial we'll be looking on what is watermark in image okay so basically one of my subscriber ping me out okay that he want to extract I don't know the use case extract the water what to have from the email body okay and he was not able to do so so uh I thought let's give it a try and I came across an API so in today's tutorial we will be looking key what is watermark in servicenow email okay what exactly signifies and how we can extract and a watermark from an email body okay so first let's look into the definition okay what service now tell us about walk to mark so by default the system generates a watermark label at the bottom of each notification email to allow matching incoming emails to existing records okay so basically uh whenever outbound email goes right whenever a mail gets sent to your mailbox okay and you reply to that mail so there should be some unique identifier right using which servicenow will recognize key okay this action or this uh reply is coming for which particular email okay so for that this Watermark is used okay each Watermark includes a random 20 character string that I will be showing okay that makes it unique okay so it's just a unique identifier for the email okay just to get a hint which particular uh email Trail is going on okay so let's get jump into so what we'll be doing now this is my personal development instance which you can see on the screen so I will go and we will look for image first so I will go and into image and I will just show you how exactly the watermark looks I will just remove the filter um all one okay and let's take some incident okay this one okay this is the same this image so foreign okay and if you scroll down right there is a body I'll not explain it over here and we will directly go to the preview so that you can see and identify the same when the email hits your outlook okay so if you do the preview email this is how the mail looks when it comes to your inbox right okay at the last of the email you can see this ref message uh underscored some some random characters right this is a watermark so this is a unique identifier so if you reply if you get this mail to your outlook okay and if you or mailbox okay and if you reply to this mate it will be like uh it will it will match this particular Watermark and then Define the action based on this particular watermark on the target record which will be this one zero zero three nine incident now you can see this body and this body may be random right this or footer may also be there it's it's conditional right okay based on your preferences okay so how we can extract this what Mark okay this was the question so it's pretty easy okay to do okay so I will simply for this particular thing I'll just open this record in explore only okay so if you are not aware about vertex Stories the explore is uh what we can substitute to uh script background okay and it's pretty easy to use that so what it will create some boilerplate code okay for you okay if you if you are not aware about explores so I've already created a video on the same you just for that video and you will get all the information so as you can see I've done the Glide record on CC multi bill and I did gr dot get the Society of the email which you are looking okay on okay and now we will extract the you can put all kind of encoded queries and queries okay if you want to do it on a number of Records okay I'm just defining the syntax through which you can uh use it out okay now we got the record so the syntax is pretty pretty simple a lot of people are doing just splitting and all those things on the email body you don't have to do all those things okay so I will simply got GL dot info and the send text for that EPA is Glide email watermark red email what Mark and in and this is script include you can consider and it has a function called pass message number okay and in this you have to pass the email body so what it takes it it takes the email body as the input and it will give um The Watermark as output you can see so it will be Gia Dot body why body because the email body gets stored you use using um body tag okay see if I run this out okay now now you will be able to see this um Watermark right so this is the watermark let's verify it out with the record okay so I will just copy this out and we will simply will simply go to the base email record okay so I will do the preview Ctrl F Ctrl V so as you can see we got this watermark over there pretty easy script right now let's try to understand how exactly this uh what we can say watermark is created okay so the email the what my is consist of three part okay so the email Watermark always begins with the ref okay to identify the label as a watermark okay after this identifier the default label is 31 character length Okay it consists of three things okay one is like MSD you can see right okay MLG one okay so it's a customizable prefix okay the default prefix is MSG but if you set it through a property you can change it out okay so these are default prefix then it then after that it will be a unique identifier for this record okay so Auto number identify so from here till here okay till here so it will be the numeric string identifying The Source record such as incident problem or change okay so it's just a unique identifier you can see okay for for the record and after that after underscore is it character okay oh it's a random 20 20 character string okay so this is how this combination creates the entire Watermark okay so you got the uh so in today's tutorial we have seen what is Watermark okay how we can distinguish Watermark into an email body what is the what is the structure of Watermark and how we can extract The Watermark using script okay hope uh this video was for tusha okay I hope this this answers your query okay uh if you have any queries or any doubts you can simply uh email me out or you can reach out to me on my LinkedIn profile or you can simply drop your comments on this video I will get back to you okay with the solution for the same okay till then stay safe stay happy and have a nice day thank you
https://www.youtube.com/watch?v=s5dch7hJkrs