I have webhooks on all the lists on a board and most cases I get the expected result. On one list (maybe more, I didn't check them all) the action.data.listBefore and action.data.listAfter properties are missing.
Very odd.
Fortunately I only care about the list after which is also on the action.data.card so I worked around it. If I ever care about the list the card was move from then I'm toast.
Has anyone else stumbled on this?
Forget to mention. I did delete and recreate the webhook. No change.
I didn't fully research this answer, but I have a thought on what is going on.
I have webhooks on every list on the board so when moving a card between lists I get two events, one from the list it's leaving and one from the list getting the card. I suspect that the event of leaving the list might have less data on it - before and after are meaningless concepts.
My bad for not tuning into the two events. Maybe if someone else is getting confusing results this might help out.
@Ted Mead The before and after data will depend on the idModel you defined for the webhook. It is not always the case you find the before and after list it the change does not involve a card movement. Typically in use idModel = List to watch movement into the list and I will check the card listname with the listAfter before do the downstream processing. Where I can I try not to use idModel = board_id - it creates a flood of raw data to process at the end point.
Also note that card actions (no movement like commentCard) on list that you have set will trigger data at the endpoint. You need to filter those as mentioned above.
Furthermore, the Low code platform has triggers and I used py-Trello if required for more complex processing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the explanation, although I am quite sure I have the list id as the idModel (in fact all the webhooks on the board are handled programmatically, so all have the same logic). All (most? I didn't check them all) work as you describe. For some reason that I assume is a Trello bug, this one webhook never returns listBefore/listAfter on a card move.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.