Skip to content

Instantly share code, notes, and snippets.

@mattcuk

mattcuk/emailBody.js

Created Apr 12, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.