Time Based Notifications in Coda
I responded to a question in the Coda community on how to get the next date. The uses case was about legal due dates expressed in months. The solution you find below:
I created a set of intervals via a virtual index using
Sequence() and the second
ForEach() added each item of the virtual index to the month. This resulted in a list of 20 dates (since the virtual sequence got 20 items). Each item got compared with the date of
Today() and since I am only interested in dates in the future, I only need positive dates. From this list of positive dates I take the
First(). This is the closest date and thus our next date.
Although for a beginner a bit hard to grasp, once you see the screenshots I added (in the community post) most of you will see the logic and eventually will be able to apply a comparable logic.
What is a bit less obvious for many users is that — once you have set up such a calculation — you need a system that reminds you that it is a due date. With only calculating the due date, you won’t get far.
You want to receive a notification or an email. In the example below I go with notifications, as such I avoid using a pack.
I created a table that is about daily notifications, every 10 days, every day or every 7 days (week). This is simplification of reality. For clients I would take into account holidays, working planning etc, but here for demo purposes only, this works fine.
In the above the notification is set shortly after lunch in my region (Northern Europe). The checked value in the screenshot is eye candy. The automation does not deal with row changes based on functions.
In order to have a notification that works, we create a different set up:
We ask for an hourly check and only when the criteria is met as defined, the notification is fired. The wording is confusing. When starting with Coda I assumed you had to write an If statement, but that is not the case. You need to write a formula that once it outputs something true, does the job.
The notification I generate is a value living in the table. To get this message out, the below does not work for reasons unclear to me.
Instead I created a button in the table and pushed this button each hour.
In the button I defined the message as I initially did in the automation and I added the condition via the disable function in the button.
This is it, not too difficult, but more a combination of things you have to know in order to proceed properly.
You find the above table in this template:
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.
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.