Single publish event triggering multiple (duplicte) webhooks

I have a webhook named "n_get_init" that is triggered by an event named "n_get_init".

I have verified that my devices are only sending this event once, but the event is always triggered twice. This leads to multiple responses which is not ideal.

Here is an example screenshot:

The fun part is, even when I deleted this webhook, I could still test it by publishing in the events page and I would get two triggers as well, to a webhook that was deleted!

My server is responding twice, so I know that this is not just a logging issue in the event console, the webhook really is being sent twice.

Now I only have a single webhook with this name in my integrations, although I do have another webhook named "get_init", but my understanding is that "n_get_init" event shouldn't also trigger the "get_init" event. Also, issue remains even when the "get_init" webhook is deleted as well.

I think this doubling of my webhooks is happening with other events too.

Could there be some duplicates hidden somewhere that I can't see?
Or maybe something going on with organization integrations?

Any help is appreciated, I would have submitted a support ticket but particle doesn't make that easy anymore.

The event name trigger for an integration is a prefix, so "n_get_init" will not trigger "get_init" but "get_init2" would trigger "get_init".

The most likely reason is that you have a webhook in both the product and the top level of the developer sandbox. If a device is claimed to the account, both will trigger.

Check these locations:

  • Sandbox - Cloud Services - Integrations
  • (Your Product) - Cloud Services - Integrations
  • (Your Organization) - Cloud Services - Integrations

Thank you for the suggestions! I found a duplicate webhook in my sandbox integrations. I didn't know they would also be triggered by product events.

I have a similar problem but since I have only a single webhook, the explanation escapes me.

My code, below, works perfectly except that every time either Particle.publish command executes, the target Google sheet receives two incoming events with exact same time stamps (see apps script execution log, also below). There are no other Particle.publish command anywhere withing my firmware.

Any ideas as to what is going one or, ideally, a solution?

if (millis() >= lastPublish + publishInterval){ // If it's been 5 minutes since last publish
    if (status1==1){
        if(lastSent==0){
           Duration = ((millis() - whenLast)/1000/60/600); // Duration in hours
           Particle.publish("Test", String(status1) + " (" + String(Duration) + " hrs.)");
           whenLast = millis();
           lastSent = 1;
        }
        else{
           Particle.publish("Test", String(status1));
        }
    }
    if (status1==0){
        if(lastSent==1){
           Duration = ((millis() - whenLast)/1000/60/60); // Duration in hours
           Particle.publish("Test", String(status1) + " (" + String(Duration) + " hrs.)");
           whenLast = millis();
           lastSent = 0;
        }
        else{
           Particle.publish("Test", String(status1));
        }
     }
  lastPublish = millis();
}

Are you sure you don't have two integrations? If you have one in the top level of the sandbox (Cloud Services - Integrations) and also in a product (Sandbox - Products - your product - Cloud Services - Integrations) both will fire off the same event.

The other common cause is that the event name for an integration is a prefix, so a webhook that triggers off "Test" will also trigger off "Test2".

You are up early Rick! That was it! I never knew that integrations could be in two places! Once again you have been my savior. Thank you!

1 Like