Alright here you go - This is what I would do:
And here’s the doc link that you can see the button in it working.
Couple things to note:
- Yours will be different, because you will be doing it in an automation, and therefore where Im accessing
JSON
you are going to be accessingStep1Result
- In order to find the number of keys in your JSON object, Im splitting on a
:
character. This will only work in situations where your incoming object is NOT nested and doesn’t contain a:
anywhere but to separate keys and values. - You can’t simply divide by 2 in the sequence formula IF the actual object has other keys that are unrelated to your status/id keys that you are after.
Again - coda is not great at working with Objects, it’s great at working with lists. If you need more complex object manipulation, best to pass the data first through a script outside of Coda and then use the API to add the rows.
Personally, I’d do it through a google apps script (Catch your webhooks in the apps script, parse the payload there, and then use Coda’s API to add the rows.