How can I put custom text in an approval email?

james_cox
Kilo Contributor

Hi There,

I'd like to include additional information in an approval notification in my workflow. For instance, a user will make a selection, and I would like to use the description to populate part of the approval request that goes to the manager. I'm sure it can be done via template/javascript, but any guidance is greatly appreciated.

James

1 ACCEPTED SOLUTION

You just need to dot-walk to the variables you need. The sysapproval record is the "Approval For" information.


Example:


Request Type: ${sysapproval.cat_item}


Requested For: ${sysapproval.u_requested_for}


Short Description: ${sysapproval.variables.short_description}


Comments: ${sysapproval.variables.comments}


View solution in original post

9 REPLIES 9

Hi James,



The more I think about it, if you're just adding text and pulling in a variable, you probably can just use a template. What is it that you want to do?


Take a look here:


Email Templates - ServiceNow Wiki



Ken


Ken, 

Do you think I could use the email templates in an approval workflow for a catalog item?  We're trying to find a way to add links to documents (KB articles) to the standard approval notification, but only for this catalog item.  I don't want to edit the global approval notification. 

I want the ability to send something to the user and have them reply back with an acceptance of some terms of agreement that are in the link.  Is the only way to do that by having them reply to the email and ingest it into the work notes?  (In a perfect world a button like the approve/deny on the approval would be nice instead.)

Thanks, 

Sara

 

james_cox
Kilo Contributor

Hey Ken,


Actually I did look at that, but that only gives you variables from the approval table. I need to pull values from the current Request/Requested item.



James


You just need to dot-walk to the variables you need. The sysapproval record is the "Approval For" information.


Example:


Request Type: ${sysapproval.cat_item}


Requested For: ${sysapproval.u_requested_for}


Short Description: ${sysapproval.variables.short_description}


Comments: ${sysapproval.variables.comments}


If it were a snake it would have bit me.



Got what I wanted by dot-walking down to the cat_item description...



${sysapproval.cat_item.description}



Thanks for the help Ken!


James