Coda notification dates

Coda notification dates

Only get alerts when you want them

Christiaan Huizer

--

We all deal with important dates we don’t want to forget, but also dates we don’t want to put in our calendar. For example the dates your subscriptions are renewed. In this blog I show a few basics on how to make an automation work for you.

The context

We have a table referencing docs representing subscriptions, their starting date the invoicing logic (each week, month, etc) and we can define the logic we want receive a notification. It looks like below and the essential info is in the column ‘getNotified’.

starting point

As you can see the user selects per contract how often and when she wants to receive un update. In this blog we assume that the renewal date is self evident and thus we have a reference we can relate to.

The list of dates

We start with the generation of dates and that is based on values living in the table we reference.

Interval days

We have the display value, the interval, an index and per interval a message, which will be useful when creating the notification.

Based on the reference table we can create a formula that outputs a list of dates. As you see we use the index, but we could have used the ‘interval’ as well. The ForEach() turns each number into a negative number and since the reference date is inside the Foreach, we have add as many negative numbers as there are notification days selected.

the formula to output a list of dates

Based on this list we can move to our next step, that is getting the date that is as nearby the date of today as possible.

The next date

As you may have assumed, we need a filter.

we filter the list of dates to get the one as close to today as possible

Last but not least, in case the date of today equals the most recent date, we have the right condition to trigger the automation. Below how that goes.

thisRow.getNotified.index.ForEach(CurrentValue * -1 + thisRow.renewalDate).Filter(currentValue >= Today()).First() = Today()

Voila, with the above logic you have a corner stone in setting up your own subscription follow-up. Key in this set up is the data architecture, much more than the formulas. As you can see, the latter is rather simple.

This is often the case in Coda. The foundation is more important than what you put on top. You can apply this logic to birthdays, working holidays and much more.

My name is Christiaan and blog about Coda. Since the summer of 2023 often (but not only) about how to Coda with AI to support organisations dealing with texts and templates. The latest Coda AI update was on Dec 7, 2023.

Why I focus on Coda AI you can read here: ⤵️

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. 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
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!

No responses yet