Weird behaviour querying item after webhook

Hi,

On item creation I send a monday webhook to my api.
On my api side I get the webhook and send an event on my side.
This event query monday and get the item from a column that was set at its creation, but it almost fail to get the item everytime.
When I add a 1 sec delay to my event, things work fine.

Hey Zalayeta,

Our webhooks are queued and sent based on overall platform load. In high-traffic situations, you might find your webhooks taking 1 second (or longer) to emit an event.

I would recommend adding a 5 second delay just to be safe (or implement a retry mechanism).

Does that help?

Hi @dipro-monday.com,

The problem is not with the webhook here, more with the item creation event.
After an item is created, it sends a webhook, that webhook triggers an action that make me fetch the item on monday side. Sometimes no item match my query while it should be impossible.
It seems that items on monday side are created with a name first and then filled with the data (its not created with all its data but more like updated). Is this right?

  1. Monday automation creates an item to a board (it must fill this item with an id that the other item had, its an id I have on my db)
  2. Monday send a webhook after it created the item
  3. My api receive the webhook and send a request to monday to retrieve the new item created, to retrieve it, it uses the id
    Sometimes on step 3 monday tells me that no items match my query while it should’nt be possible.

Do you get the point?

Ah, I understand what you’re saying. Is the webhook recipe you’re using “When item is created, send a webhook”?

Yes it is.
Also I see that it sends the webhook like 6 times for 1 item creation.
So my theory is that monday creates an item. And then fills its column one by one which all trigger a hook. Thats why sometimes when I query monday after I received the first hook, the id column is not filled yet.
Am I right?

Yep, that’s exactly it. The change_column_value event gets sent every time a new column value is updated on the item.

That’s not really what I asked for.
I asked the process of item creation by automations.
In my case, why do the automation bellow which is launch once triggers 6 times the same webhook?
Automation called once:
When STATUS changes to SOMETHING, create an ITEM in BOARD and link them using LINK TO ITEM in this board.
Triggers 6 times:
When an item is created send a webhook

I see. Thanks for clarifying. Let’s figure this out over email; I’ve just sent you a ticket about this so we can resolve it together.