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.
Master Bubble & Launch Your MVP
Embark on your Bubble.io journey with our Free Access, or accelerate your progress with the 90-Day Pass for just $99.
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 500+ 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.
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.
No. Our Beginner Essentials course and AI No-Code Coach are designed for total newcomers. You’ll learn Bubble.io step by step - no coding required.
Simply type your question in plain English, and our AI taps into the entire video library to recommend the exact lessons you need. It’s like having a personal instructor on demand.
- Free Plan: Enjoy unlimited access to the Beginner Essentials course.
- 90-Day Pass: Unlock all 500+ videos and full AI functionality for 90 days. Afterward, you can subscribe at a great rate to keep building and learning.
Our AI No-Code Coach is your first stop. If you need deeper help, consider optional 1:1 coaching for personalized guidance. We also host occasional community events to share tips and celebrate wins together.
After your pass ends, you’re free to continue with a cost-effective subscription that includes ongoing AI No-Code Coach access and any future content updates.
Absolutely. If you don’t see real progress within 30 days of your 90-Day Pass, let us know, and we’ll issue a full refund—no questions asked.