Get eventids for events issues by our API key

We are updating Trello boards through the API and receive updates through webhooks. Is there a simple way to understand which webhook updates originate from our API calls, i.e. is it possible to get the event id of the update that we issued or can we somehow retrieve the originator API from the webhook?

Any input is appreciated

1 Like

Hi, thank you for your interest in building with Trello! To answer your question, yes, every action has an id field, which uniquely identifies the action that was taken.

https://developer.atlassian.com/cloud/trello/guides/rest-api/webhooks/

Hopefully that helps, and please reach out if you have any more questions.

Hi Jireh, thanks for getting back here, we got the event id from the webhook and would like to get the event id from the action that we issue from the API is that possible?

So for example, when we update the due date through the API, and then we get webhook events in, can we get the corresponding event so we can link it to the webhook event?

Hi Jirah, to add to this, what would be simpler for us if we can see what the source of the event is in the webhook, is this for example the trello user from the client, API key etc?

Sorry, I’m not sure if I understand you. If you look at the “Trigger webhook” section of the API doc, you will see an example of a webhook response when the model you are watching has changed:

{
   "action": {
      "id":"51f9424bcd6e040f3c002412",
      "idMemberCreator":"4fc78a59a885233f4b349bd9",
      "data": {
         "board": {
            "name":"Trello Development",
            "id":"4d5ea62fd76aa1136000000c"
         },
      ...

As you can see, the webhook gives you the action that triggered it, which includes the action’s id. I’m not sure what you mean by

can we get the corresponding event so we can link it to the webhook event?

The action that is sent by the webhook IS the corresponding event that triggered the webhook. Please let me know if I am misunderstanding your question.

As for your other question, I don’t believe there is a way to see the source of the event.

1 Like

Hi Jireh, thank you for this, we missed that the action id is returned from the API and will check this, that will indeed close the loop and that was not clear to us. We’ll investigate in this direction.

With regards,

Reinder

1 Like

Hi,

We have a scenario where we send a change to Trello, and the exact same change is sent to us using webhooks. We would like to check if the change originated from our system, so we can skip processing this change. In other situations it might cause loops between our system and Trello.

Three ideas how we could achieve that:

  1. Get the change origin (if its trello, or our system, or a different API client, id or name)
  2. Get an action id, that is also returned in response to sending a change to trello.
  3. Send our event id when updating a value, the vent id should be sent by the webhook as external event id

The second one was kind of mentioned by Jireh, but when we send a change to Trello, ex. card title update - we do not receive an action id in the response and cannot connect the change to a corresponding webhook event.