Issues with concurrent executions for a Zoom workflow with $checkpoint

This topic was automatically generated from Slack. You can find the original thread here.

Paul : Hi team! I’ve created a workflow that triggers from a Zoom Phone webhook, then posts a chatbot message with some info about the caller from the CRM.
But now I’m having difficulty because the incoming call webhook arrives 3 or 4 times almost simultaneously.

So my workflow triggers as many times as the trigger arrives, putting 3 or 4 duplicate chat messages in our channel.

There are a few things I have tried. Mostly by experimenting with $checkpoint
The webhook payload arrives with a call_id: property which is unique for each phonecall.
Therefore if the call_id of a future trigger matches the previous one, I $end the workflow early.

This idea works perfectly if I replay the workflow manually.
But it appears the webhook fires in simultaneously. Monitoring $checkpoint via console.log shows me that each of the 3 or 4 invocations are behaving exactly the same, and not $ending early as they should.

I feel like there may be a better way to handle this situation but this circa 2002 era PHP guy is a bit out of his depth :flushed:

Pravin Savkar : I’m not sure why duplicate events are being generated by Zoom, but one option that may help the $checkpoint workaround is to limit the workflow concurrency to 1 worker. That will queue the events and enforce serial execution (so only a single event is processed at a time). If that doesn’t work, you may also want to try throttling workflow execution to 1 execution per second (or more). Here’s more info on workflow concurrency and throttling controls:

https://pipedream.com/docs/workflows/events/concurrency-and-throttling/

I hope that helps!

Paul : thank you for your response! That sounds like the perfect solution. However mine is all greyed out and says "not available for current trigger"

Paul : As an aside (and totally not your problem!) I think the duplicate events are coming across because it fires when someone is calling our team and these ring simultaneously, therefore every person whose phone is ringing = an event. There may be a better event to trigger from but if I can get concurrency feature working.

Paul : silly me! I just read in the docs:
“Event queues are not currently supported for native workflow triggers (native HTTP, cron, SDK and email).”
I was using native HTTP.
Oops. I will change to HTTP / Webhook.
Thank you once again! And apologies for the inconvenience.

Pravin Savkar : Sorry, I assumed you were using a Zoom event source! But I’m glad you figured it out – did enforcing concurrency solve the issue with duplicate messages?

Paul : Yes - it’s working perfectly now thank you once again sir.