
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 31, 2020 06:41 PM
I use Airtable to hold content parsed from HTML emails. The html content is in a long text field.
I want a Block that I can use to render the message content from those emails.
Does this exist?
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020 07:06 AM
There is a way, but it is hypothetical - it goes like this:
- Read the HTML content field.
- Transform the content (as best possible) into Markdown.
- Render using output.markdown() in the block.
Step #2 is the challenge, but there are many javascript libraries (like this one) that you could choose from and that would run as a function inside your script block.
You could also build your own transformation function that targets specific HTML tags and sanitized the content for all those that you don’t really care about.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020 07:06 AM
There is a way, but it is hypothetical - it goes like this:
- Read the HTML content field.
- Transform the content (as best possible) into Markdown.
- Render using output.markdown() in the block.
Step #2 is the challenge, but there are many javascript libraries (like this one) that you could choose from and that would run as a function inside your script block.
You could also build your own transformation function that targets specific HTML tags and sanitized the content for all those that you don’t really care about.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020 07:50 AM
@Richard_Foxworthy This doesn’t exist, but it would be a welcome addition to the blocks! There is a custom block contest going on right now… perhaps you can suggest it to someone to build this block for the contest!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020 06:48 PM
This should be possible with a Custom Block.
- Read the template
- Substitute all the mergetags
- Render HTML.
- Use it as input for your email.
Without the Custom Block:
You should be able to write a simple version using “SUBSTITUTE” formula. Since your template can contain a limited number of merge tags, you should be able to substitute all of them one after another. Arrays and loops might be a challenge.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020 08:11 PM
Thanks for replies so far, just want to clarify that my own use case is that I parse html content from incoming emails (using Zapier) and write the html message content to an Airtable long text field.
I want only to render and view that message content in a block - ie to view the message content similar to how it would render in a standard email client - I don’t need to view or edit the actual html code.
I do not need to generate and send html email message content out of Airtable - although I can see that could be very useful functionality for other use cases…
