How to use HTML + coda button + formula

Hey guys,

I’m currently building out an update email system for my clients workspaces. When I click a button I send a HTML/CSS formatted email to the client. I’m having fun and success with this but need to have a slight edit using formulas to get it to work properly.

Currently Im just dumping the HTML and CSS into the content box:

However I need to update the link inside the HTML with a direct link to the clients workspace. It would be great if I could just use a formula like thisPage.URL() for example.

Is there anyway to put dynamic formulas inside HTML & CSS?

You can build a formulated string inside the formula editor, I guess that’s the answer you’re looking for?

I.E. “this is my page: " + thispageurl + " and some other stuff…”

1 Like

We have a thisDocument formula reference you can use. E.g. thisDocument.Url(). Is this what you’re looking for? We don’t have a thisPage formula reference yet, but we are tracking votes towards a feature request for this!

2 Likes

I think your best bet would be to copy and paste your content into a table cell, then use {1} as a placeholder for your doc link within the HTML. You can then create another column that uses the Format() formula to sub in your doc URL. E.g. The formula for that second column could look something like this: Format(thisRow.HTML, thisDocument.Url()).

More on how the Format() formula works here: Coda | Formula library.

Let me know if you have any questions on this!

1 Like

Thanks Renita for you reply!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.