How to limit Webhook clicks?

Hello friends

Simply put, I have some users who double or triple-click on webhook links and it’s causing my Scenarios to run 2 or 3 times, when only 1 is necessary.

The flow is this:

  1. User clicks a button, which is the webhook URL
  2. The Scenario runs

However, some impatient users are either double-or-triple clicking the link, and it’s causing the scenario to run multiple times, unnecessarily. Sometimes the clicks are seconds apart, and sometimes it’s up to 20-30 seconds apart.

My options are as follows:

  1. I can put in the scenario to delete the button immediately on click, but that won’t stop the double-clicks as they are only seconds apart
  2. I can put in some form of UUID into the link, and write the scenario to ignore duplicate UDIDs (I think?)
  3. I can put in some form of rate limiting, but then these clicks will be enqued, and run anways.
  4. Magical fourth option.

Any ideas?

Hi @Mike1,

I suppose you could devise a way that a webhook can only be processed once every X minutes. So that if a webhook is triggered, it will run the first time but ignored every extra trigger for the next X minutes. That wouldn’t be foolproof, though, if two different users will click the button in the same window.

But don’t make it hard on yourself. You are receiving double clicks out of frustration. A visual indicator that something is happening will cut down frustration clicks enormously. If you add a loader animation, this visual feedback will let the user know that his action triggered something.

Cheers,
Henk

2 Likes

Thanks for your time, I appreciate it.

I’m somewhat limited in what I can do with respect to loading animations etc. as the webhook button resides inside a google spreadsheet, so javascript etc. is off the table.

I switched the settings to sequential processing instead of parallel, which is a start, but I’m still a bit hung up on how to prevent subsequent processing based on a UUID.

Do you think it would be:

  1. Webhook contains a UUID
  2. Scenario runs, checks a database to see if the UUID is unique or not
  3. Scenario continues?

Hi @Mike1,

When clicking the link, does a new browser window or tab open up?
If so, you can add a webhook response module to serve back a simple message or even a webpage, or javascript to close the window or tab that just opened.

If there is something unique in the webhook URL, another option is maybe adding a Data Store in the beginning of the scenario.
Add a record to the Data Store using that unique data as the key to indicate the process has begun.
If that record already exists, end the scenario.
If not, proceed.
At the end of the scenario, delete that record, if they’re allowed to run it again.

If there isn’t a unique piece of info in the URL, then you can enable headers and read the IP Address that the click came from and maybe restrict multiple runs that way?

2 Likes

Okay here’s what I ended up doing:

  1. A webhook response forcing the window to close after X seconds
  2. Data store - Check the existence of a record
  3. if the record exists, the scenario stops. If the record doesn’t exist, the scenario continues, and
    creates an entry in Data Store - Add a Record

So subsequent duplicative clicks on the webhook do this:

  1. webhook click
  2. data store - check the existence of a record
  3. if the record exists, stop.
3 Likes