Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!

Help: Adding work table content into a workflow alert


Level 2


I am trying to add content from my workflow into the body of an alert.  I'm using the process outlined by Adobe via inserting a javascript code activty.  The workflow appears to run but the alert is not properly populating with the data.  Below is the code i am using in the javascript activity as well as the alert. Any insight into what i'm missing here would be much appreciated!

2019-09-26 09_19_32-Adobe Campaign Classic - Client console (pomeroyw@PROD).jpg

Javascript Activity:

var query = xtk.queryDef.create( 

    <queryDef schema="temp:query2" operation="select"> 


       <node expr="[/@label1]"/> 




  var items = query.ExecuteQuery();



var items = new XML(instance.vars.items) for each (var item in items){ 


  • <%= item.@label1 %> <%
1 Accepted Solution


Correct answer by
Level 10
5 Replies


Community Advisor


Alerts (deliveries) don't have access to workflow's vars. You have to ship data through one of the activity's properties, usually title or message.

In the initialization script of the alert activity (under Advanced), add this:

activity.message = instance.vars.items;

And then in your alert:

<% var items = new XML(dataSource.message); ... %>

I have a library that formalizes this approach and provides a shared scope across workflows and deliveries, should be how the product works really.




Level 2

Hello John,

Thank you for your help.  Would you mind providing additional clarification on the second part?  I'm unclear as to where this is pulling from or what else needs to be added here to populate with the data from the work table.  Apologies for my lack of knowledge on this.


Level 3

Hi you need to add additional variables info to your JS code after - var items = query.ExecuteQuery();


for each (var row in items )

instance.vars.label= row.@label1;


then in alert use this instance var  as-  <%= instance.vars.label%>

Hope this helps.


Correct answer by
Level 10

Hi Wesp,

See also my answer in this post:

How to Personalize the Workflow content into Alert Activity.