Skip to main content

Hi,

At TeamworkIQ we’re creating our first Instant Trigger. This trigger is returning a set of items it fetches from our server. Each of the item returned has a uniq id property, but calling the webhook that triggers the zap more than one time will continue to run the next steps with all of the items in the result, it is not filtering out those that have been seen in a previous execution by the id.

The perform operation of this trigger is actually shared with another Poll Trigger in our Integration, so we could test the same trigger in both Poll and Instant types, and receiving the same results.

Hi @khakman - Actually, Zapier doesn’t dedupe instant triggers. The server needs to make sure it doesn’t send the same event twice. If you’re building your app with the CLI, you can also implement your own deduper using an open-source library I wrote: https://github.com/ikbelkirasan/z-deduper


Thanks for the information @ikbelkirasan . Zapier platform documentation here https://platform.zapier.com/docs/triggers#3-enter-api-configuration mentions for both Polling and Hook: 

With both, Zapier expects to receive an array with 0 or more objects that will be passed to Zapier’s deduper—and it will return any items that haven’t been received before, and use them to run the subsequent steps in the user’s Zap.

 

Additionally, we’d like to implement a security mechanism for the Webhook requests to be authenticated.

  1. Receive a secret as a response for the Subscribe operation that needs to be stored in the Zap context.
  1. Validate a header sent on each webhook request before triggering the zap

Is it possible to store a property received on the subscribe request in the bundle object for the zap? Or any other place?

CleanedRequest documentation mentions we could access the headers property, but trying to test this, I’ve only been able to get the body payload and a querystring property. Is it possible to have this validation on every webhook request received and accessing their header before proceeding to run the zap? 

 

Regards

 


@ikbelkirasan is correct, and the docs referenced there are actually in error.  Zapier does not deduplicate data passed to a hook - the expectation is that, for hooks, the source platform is capable of once-and-only-once messaging.   

I’ll get those docs corrected - thank you for calling that out.