Send HTML formatted content with gmail Pack

#1

Any suggestions on how would be the best way to format and send a confirmation email through the gmail pack direct from coda. I created the process through a button action, and the content is based on different info from the same table concatenated into one column. The process is working, but i don’t like the formatting of the sent email.
Thanks in advance for all your help

#2

Hello Adalberto,

I have been working on this for myself, here is an example of a very simply summary email for a project update, you can add on quite a bit with additional inline css.

It is using a control “projectView” as well as two tables, “Project Tasks”, and “Project Notes”, which are filtered views of general tasks and notes tables. The below is a named formula, “ProjectEmailHTML” I have on a seperate section in the doc:

=concatenate("<html><head><style>
table,th,td{
border: 1px solid black;
border-collapse:collapse;
}th,td{width:100px;}
</style></head><body><h2>Overview</h2>",projectView.Value.Overview,"<h2>Timeline</h2><table><tr><th>Exploring</th><th>Building</th><th>Testing</th><th>Target Finish</th></tr><tr><td>",projectView.Value.[Exploring Start],"</td><td>",projectView.Value.[Building Start],"</td><td>",projectView.Value.[Testing Start],"</td><td>",projectView.Value.[Target Finish],"</td></tr></table>","<h2>Tasks</h2><table><tr><th>Scheduled Date</th><th>Status</th><th style='width:600px'>Task</th></tr>",FormulaMap([Project Tasks],Concatenate("<tr><td>",Scheduled,"</td><td>",Status,"</td><td style='width:600px'>",Task,"</td><tr>") ).Join(""),"</table>","<h2>Notes</h2><table><tr><th>Date</th><th>Source</th><th style='width:600px'>Notes</th></tr>",FormulaMap([Project Notes],Concatenate("<tr><td>",Date,"</td><td>",[Note Genesis],"</td><td style='width:600px'>",Notes.RegexReplace("\n","<br>"),"</td><tr>") ).Join(""),"</table></body></html>")

This then is setup on a button on my project overview page:

And produces the very rudimentary email below:

2 Likes
#3

Thank you very much Bobby, you pointed me in the right direction!
I managed to send an HTML formatted mail following your example.
Much appreciated!