Access vars in email body, send email flow designer

AnthonyMull
Tera Contributor

Hi community

 

can someone help me understand how to access variables from the toggel script window on Send email action, within the email body. Please see attached screen shot, I would like syntax to access that variable.

 

Cheers

2 REPLIES 2

John Palmer
Tera Expert
var sysId = fd_data.trigger.request_item.sys_id;
shows it as:
var num= fd_data.trigger.request_item.number;
var text = "write your text here <br/><br/>Number: ";
var url = "https://Add your URL here/sp?sys_id="+ sysId +"&view=sp&id=ticket&table=sc_req_item";
var url_final = '<a href = "'+url+'">'+ num +'</a>';
return text + url_final ;

Amit Verma
Kilo Patron
Kilo Patron

Hi @AnthonyMull 

 

Suppose I have a catalog variable dockNumber which I want to send in an email body. To achieve this, I will build a html string and finally return it in the email body toggle script as shown below -

 

AmitVerma_0-1731647985185.png

 

AmitVerma_1-1731648039148.png

 

var dockNumber = fd_data._1__get_catalog_variables.dockNumber;
var htmlString = '<html><p>Hi Team <br><br> The dock number is'+dockNumber+'</p><br>Thank you</html>';
return htmlString;

 

Output -

 

AmitVerma_2-1731648086087.png

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.