Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Webhook Callback Object Missing listBefore and listAfter

Ted Mead October 28, 2020

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.

2 answers

0 votes
Ted Mead November 17, 2020

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.

0 votes
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 28, 2020

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

Ted Mead October 29, 2020

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events