Hi there!
I am working on a function that generates the content for an email body, to be used in either a notification effect from an automation or in a notification effect for an action. Platform documentation outlines the process for a “Notification Builder” function, but I wasn’t sure if an automation (or action) function-generated email body could also just take in an HTML string? When I wrote a version of the function below, the function doesn’t populate as an option to select. It is published to master branch and tagged.
export function getExampleEmailBody (object: ObjectType): string {
return (`
<h2>Example header</h2>
<table style="width:100%;border:1px solid black;border-collapse:collapse;">
<tr>
<th style="border:1px solid black;padding:5px;text-align:right;">Object Property 1</th>
<td style="border:1px solid black;padding:5px;">${object.objectProperty1}</td>
<tr>
<th style="border:1px solid black;padding:5px;text-align:right;">Object Property 2</th>
<td style="border:1px solid black;padding:5px;">${object.objectProperty2}</td>
</tr>
</table>
`);
}