Photo by Beatriz Pérez Moya on Unsplash

How to send an attachment in Coda?

Using the file link you create with ParseJSON

Christiaan Huizer
4 min readAug 25, 2022

--

In the

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

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

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

, where are you waiting for? 😜

I hope you enjoyed this article. If you have questions feel free to reach out. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. Besides you find my (for free) contributions to the Coda Community and on Twitter

My name is Christiaan and I support SMB with calculations (budgets and planning) and I prefer using Coda to get the job done.

Coda comes with a set of building blocksーlike pages for infinite depth, tables that talk to each other, and buttons that take action inside or outside your docーso anyone can make a doc as powerful as an app (source).

Not to forget: the Coda Community provides great insights for free once you add 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

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