Exploring the Cause of AssemblyAI Webhook Duplication in Bubble Database [2024]
Troubleshooting a bug with webhooks and the AssemblyAI API.
Unlock AssemblyAI's hidden power: Discover how to avoid costly webhook duplications in your Bubble app!
Optimize your Bubble workflows: Learn the secret to preventing multiple runs and saving on AI prompt costs.
Master backend workflows: Streamline your AssemblyAI integration and boost your API efficiency in Bubble.
AssemblyAI Webhook Duplication in Bubble Database
Here's something interesting that I've learned when using AssemblyAI to generate transcripts of our videos for an internal app I've been building for Planet No Code. Effectively, we submit an mp3 file of our videos and we use their service to convert the mp3 into a transcript. We get timestamps, chapters, and then we use those timestamps to generate our chapter headings that we can paste into our YouTube descriptions. But the issue I was having was that when AssemblyAI seemed to have generated the transcript successfully, I was checking that in the logs. I was noticing that every action after that was running multiple times in my Bubble app, and that included running some rather expensive Claude AI prompts.
Multiple Workflow Executions
I was sometimes getting, it would run five times per MP3 file that I submitted that kind of start of the process. And then I worked out why. So if we dig into the AssemblyAI documentation, and right the way down here on webhooks, we see that they will try and respond to a resend the webhook up to ten times, waiting 10 seconds. Now, here's something you might not know about Bubble, which is that if I go into my backend workflows, this is the workflow that runs when AssemblyAI has finished in the transcript. I get back a transcript id, and then I would recall one of Assembly AI's APIs and I would get back my transcript content.
AssemblyAI Mini Series
We do cover all of that in a mini series on AssemblyAI. I'll put a link down in the description to access that. But to get into the detail here, what was happening was I had all of these generate content workflow actions, some of these taking 30 seconds to run, because I would send the whole transcript over and I'd ask for a lot of data back. I had all of that in this workflow here. Here's the issue.
Bubble's Webhook Response Behavior
Bubble will only respond to an inbound webhook with a success status when the workflow has completed, which means that if you put too much content in the endpoint that you're using to be notified when AssemblyAI has finished generating the content and the transcript is ready, it will fail and it will wait 10 seconds and it hasn't got a response. So it will retry, and it will retry and it will retry. So this has cost me not a large amount of money, but it's cost me more than I was expecting in anthropic top ups of my account, because it was running five, six times for each MP3 file that I was putting through this process.
The Solution: Minimizing Endpoint Content
So the fix is to really reduce down what you've got in this endpoint. So I'm doing the bare minimal, and then I'm actually putting the rest of it in another backend workflow that I send data through to, and it moves onto here. Here's actually where I fetch my paragraph data. And then all of this, which can take actually about two to three minutes, is in a completely separate workflow. So this bit here can execute really fast. And I no longer get duplicates in my database after using AssemblyAI to generate a transcript.
Ready to Transform Your App Idea into Reality?
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
14-Day Money-Back Guarantee
We’re confident this bundle will transform your app development journey. But if you’re not satisfied within 14 days, we’ll refund your full investment—no questions asked.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
Not at all. Our courses are designed for beginners and guide you step-by-step in using Bubble to build powerful web apps—no coding required.
Forever. You’ll get lifetime access, so you can learn at your own pace and revisit materials anytime.
Our supportive community is here to help. Ask questions, get feedback, and learn from fellow no-coders who’ve been where you are now.
Absolutely. If you’re not satisfied within 14 days, just reach out, and we’ll issue a full refund. We stand by the value of our bundle.
Yes, this is a special limited-time offer. The regular price is $350, so take advantage of the discount while it lasts!