Community Hackathon: Charts in Email

Welcome to our first run of the Community Hackathon!

I started using Coda in February 2018 and have loved learning from all the creative ideas in the Community. If you’re like me and enjoy building on each other’s ideas to create solutions and templates for others to use, then please jump in here and give it a shot!

So, what’s a Hackathon you ask! At Coda, the whole company gets together quarterly to brainstorm and build any ideas we can think up. We split up into teams, each team chooses an idea, then we spend two days…and nights…working to make it happen. At the end, we present to the group and everyone can try it out in test environments.

These are a lot of fun and quite a few ideas that you see in the product today were born at a hackathon!

In reading through community posts and questions, there are a few that tend to be recurring and it feels like an answer, or several answers, are just around the corner. Sometimes it just takes a little bit focus and collaboration, so here’s the first Coda Community Hackathon topic…

Charts in Email

Scattered throughout posts on the Community, as well as questions submitted to our support system, it’s easy to find the question “How do I get charts in my emails?”. We are constantly working on new features at Coda, but this one has not made it to the front of the line just yet. I wanted to bring it to the Community and see what creative solutions pop up in the meantime.

It seems like there might be several possibilities, so choose your strategy and give it a shot!

The Rules:

  1. It must be a “no code” solution in the sense that the end user does not need to understand code to use the doc and send an email.

  2. It can use any officially supported Coda feature or formula. (no hidden test stuff where you’ve been warned it could break in the future.)

  3. Any outside services are fair game, but having an open-source or free option is preferred everyone can use and test it.

  4. Solo entries and Team entries are accepted!

How voting works:

Entries will be voted on by Coda employees at our Friday all company meeting. We’ll share your demos with all employees and they will cast their votes.

Win Coda swag!

Submitting your entry:

Entries are due by Friday November 8th, 2019 at 9:00am PDT

Post a reply and your embedded doc to the following thread:

Not sure where to start?

Expand on our Starter Template included in this doc!

Looking forward to seeing what you build!

6 Likes

Well, I guess using the image-charts.com is an ultimate choice already. The challenge is how to make it more user-friendly for the doc builder to set up a chart in an emailable section.

It’s a good argument in favor of allowing the definitions of functions in a document. I’d argue that it might be even interesting to allow a gallery of functions much like other templates.

@BenLee It would be interesting to understand which functions run server side, and which client.

For the sake of clarity, this doesn’t have any ties to how Coda may implement this in the future. This is me as a doc maker just working to find a fun and creative solution to something we haven’t been able to do easily yet.

I chose image-charts.com to start with because while it’s kind of an API, everything is done through the URL parameters and there is no code or programming required to get started. It’s an easier and more straight-forward starting point for a lot of people, including myself. Being more simplified in its use, it was also easier for me to experiment with quickly to see what could be done.

How things will be in the future is still very much wide open, so don’t feel steered in any direction here. This is meant to be a fun brainteaser problem like other posts on the community.

I understood the concept, but I was going with some truly outside the box thinking.

I was experimenting with adding custom functions to Coda through Javascript, hence my ask on what runs server-side and what client.

Everything runs on client side when a Coda tab is opened. It is said somewhere in Coda documentation, among the performance topics.

For email generation and automations however, I think there is still some recalculation pass on the server side. Otherwise the data in those emails wouldn’t be up to date.

Your JS hooks would obviously only work in the browser where you’d have injected your JS.

Looking at the obfuscated code it looks entirely possible to inject functions that work as native - which might make it an option to write a plugin that creates a function that can wrap image-charts.com.

Yeah, but I have a feeling that Coda would re-run the functions on the server side before rendering a section as an email.

For sure it would when an email is triggered for automation — meaning, this custom JS function would be completely useless for e.g. the task of rendering daily reports.

Yeah, I assumed as much. My thought was to only use it as a sort of macro to inline or setup an embed / template; I.e. Fix the UX of the initial post.