How to send an attachment in Coda?

Using the file link you create with ParseJSON

Christiaan Huizer

--

In the Coda Community one of the requests is how to get an invoice out of Coda. Today this is not supported very well, but you can do it in certain way. It actually means that you push the file link into the email and via your email, you download the file. You don’t have to be logged into the Coda doc to open the invoice (or any other file), everybody has access. This is not an attachment, it is a link to an attachment.

I got inspired by the response of Paul Danyliuk who wrote here:

ParseJson(thisRow.File.First()._Merge() + "", "$.publicUrl")

I rewrote this one a bit and turned it into:

ParseJSON(thisRow.File._Merge().ToText().First(),path: "$.publicUrl").Hyperlink()

You see I replaced the + “” with ToText() and and I added Hyperlink() that is all. This file link I inject via Format() on the page that contains the template. First I thought about SetControlValue() but Joostmineur made me change my mind, merci Joost!

For the rest, it is all rather straightforward when you work with a single file:

In case you have multiple files things get a bit more complicated, but not very much, you expand the logic with List() and you add to each item in the list a bullet using a FormulaMap() to have the files nicely lined out in the email.

Multiple Files in one email

in your email it looks like this:

how it looks in your email

It also happens that organisations require one file per email, their internal logic is a bit limited and thus in case of 4 files, this requires you to send 4 emails with each time a different file. Below how this goes:

as many emails as files

I create a doc I published in my gallery to shows how it goes. But unfortunately you cannot send an email , although I assume that my settings are in order to allow you for making use off the buttons in play mode. Based on this doc, you can recreate your own version anyway.

What we need from Coda

I am rather happy with the outcome. However the circle is still broken. We manually need to turn a page into a PDF and the options we here have are so limited, that it is almost embarrassing seen the high level of product features in so many areas. We need a button to turn a page into a PDF and we need settings to get control over what we want to include in our PDF, etc. It is about time for Coda , where are you waiting for? 😜

I hope this article was informative and helpful. Did it help you to solve a problem you unlike would have solved other ways? What about a donation?

My name is Christiaan, and I regularly blog about Coda. While this article is free, my professional services (including consultations) are not, but I’m always happy to chat and explore potential solutions. You can find my free contributions in the Coda Community and on X. The Coda Community is a fantastic resource for free insights, especially when you share a sample doc.

Christiaan — Coda Expert — on: “How to send an attachment in Coda?”

If you enjoyed this read and would like to get more Coda related content, please consider a Medium membership. It is it only $5 a month, and you’ll have access to every article ever published on Medium. If you sign up using my referral link, I’ll earn a small commission.

--

--

Christiaan Huizer
Christiaan Huizer

Written by Christiaan Huizer

I write about how to Coda . You find blogs for beginners and experienced makers. I publish about 1 / week. Welcome!