Coda Expert Webhook Pack — how to?

How to use the webhook trigger to relate tables in two docs.

Christiaan Huizer
7 min readMar 13, 2023

--

I worked together with Gijsbert Huijsen, the co-founder of this AI driven solution to translate audio into any language (speech2text).

Together we developed a pack to push data from doc one into doc two. This is different from what Coda standard offers inside docs. Coda offers tools to push data from one table to another with AddRow()and AddOrModifyRowst(). To get data into another doc, Coda offers Cross Docs. A much debates solution with suboptimal performance as you can read via the link below.

In this blog I show how to use the pack we developed. It is not only for free, it also works really fast. It even supports image URL’s, files and images as long as you only put one in a column, but it takes time for the automation to verify the files and images. You do not see them come through directly.

Why this pack?

There is already a paid pack that does more ore less the same. A bit less elegant I would argue; this one feels easier to use. It is for free because I believe all Coda makers should benefit from the simple option to push data into a next doc real fast.

That said, in general I don’t like paid packs. I believe this business model hinders the evolution of the product and thus the adaptation of Coda world wide. A bit like the noisy communication does about teaching ‘how to Coda’ only available for those who pay serious money to self proclaimed teachers.

Both approaches fail in creating a larger cake all makers regardless their skillset would benefit from in terms of creativity & support. I am paid for my work in Coda by my clients and I share what I can with the community to create a bigger cake for all us of.

What this pack does

A new row is created in the target doc based on a webhook trigger. This automation requires you to define which columns you want to fill out. These columns match the columns in the source doc.

The pack is installed in doc one, the source doc. It offers a function you apply in the button. This function is simple. In what follows the procedures for a complete unexperienced Coda maker.

How it works

  • You install the pack (for free) in the source doc — https://coda.new
  • You type in / packs as you see below
  • you search for CodaExpert
find the CodaExpert_Webhook
  • you click on the pack to install it in your doc
  • you have the pack active in your doc
the pack is active in your doc
  • you create a table with some columns, including a button and you search for the pack name:
use the pack in your button
  • The pack requires 3 elements, the URL, the token and the columns you want to send over. To get the URL & the token we create the second doc and we activate the automation. Again https://coda.new and we go to automations and we select Webhook invoked:
select Webhook invoked in target doc
  • We copy the URL and the token and put them between double quotes and we add the columns we want to push to the target doc. In our case three columns, firstname, lastname and email
using the webhook pack
  • We move to the target doc to complete the webhook automation. We don’t have to recall the names of the columns, only the order:
complete the webhook
  • The code you see is this one:
thisRow.[Step 1 Result].ParseJSON("$.column1")

The script in the pack grabs the data per selected column and turns it into JSON with the term ‘column’ as key. We unpack (parse) the JSON using the key ‘column’ in the target doc. This is easy to remember. You don’t need to type column names living in the source doc.

Two observations though: you cannot use a display column to bring data in (standardly this is the Name column, the first in the table). All the others work fine. Second, the data type reactions does not come through. Reactions count users and for the moment this blocks.

More about the basics of JSON you find in a previous blog.

Use Cases

When working with & for clients the issue of cross docs surfaces sooner or later and there is always a moment clients believe they need a cross doc. I try to talk it out of their heads, but succeed seldom. We end up with too many hours (and I am not even invoicing all, but still) and frustrations about views, delays etc. This solution will ease this pain partly and certainly when we elaborate on it applying an AddOrModifyRow() logic. It permits the maker to have a doc in sync from one side almost instantly.

Since you don’t rely on (view of) tables in a cross doc that potentially brings in all the tables of any doc, this solution is more secure. It only brings in the rows and the columns of your choice. The columns based on the ones you mention in the pack and the rows by disabling the buttons for rows you don’t want to push.

It is dynamic and flexible in many ways and can be applied by most makers. There is no need for diving into the head of the pack developer to make it work. You follow CFL logic and you are set.

Webhook Pack in action

Enjoy the benefits from this free pack and test it before you start to use it.

Extra — two way sync

We have been working on a solution to enable two way sync. When a doc users change values in one of the docs (per cell) the related table in the other doc changes as well and also quite fast. This is a paid solution.

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

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.

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 Huizer

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