Hey David, welcome to the Community!
I did this by examining the underlying structure of the rich text — e.g. here:
You can look into the free version doc that’s linked in that topic, HLP Initial tasks input
table. It’s not the most optimal solution there but it may give you ideas.
If you implement this now though, be prepared to fix this sometime very soon. Coda is changing the way it stores text, so it won’t be the same structure to examine anymore. Not significantly different but it will require adjustment anyway.