Azure Logic App - Inline Code - Generate HTML for an Email Body
var titles = workflowContext.actions.Execute_JavaScript_Code.outputs.body; | |
var html = ''; | |
titles.forEach(function(fulltitle) { | |
var title = fulltitle.substr(5); // Strip off the first 5 characters.. '12 - Headline' becomes 'Headline' | |
html += fulltitle + | |
' | <a href="https://www.somesite.com/find?q='+title+'">Somesite</a>' + | |
' | <a href="https://anothersite.net/search/'+title+'">Another</a>' + | |
'<br>'; | |
}); | |
html += '<br><br>Footer of email goes here'; | |
return html; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment