Webhook Problem: Image URL Occasionally Fails to Update

Hey everyone,

I’m working on an AI image generator app and I’m running into an issue that I could use some help troubleshooting.

Here’s what’s happening:

  1. When a user clicks the “generate” button, my app makes an API call to an external image generation service.

  2. The service immediately returns an ID, which I use to create a new image generation record in my Bubble.io database. At this point, the image URL is empty.

  3. Once the image is actually generated, the service sends a webhook to my app. My workflow is supposed to detect the webhook and update the corresponding record with the image URL.

The problem:

• Every now and then, the webhook arrives, but my app doesn’t update the record. The URL field remains empty, so the image is never displayed in the data.

Has anyone experienced a similar issue with Bubble.io’s handling of webhooks or API workflows? I’d appreciate any insights or suggestions on how to ensure the webhook reliably triggers the update:))

Thanks in advance for your help!

1 Like

I don’t think the issue is Bubble handling webhooks.
First, did you inspect the payload sent by the webhook? Is it always the same? What if the AI send an error instead of the file url…?
Two, did you check privacy rules or do you have ignore privacy rules on this backend WF
Three, are you saving the image to your Bubble storage using :save to Bubble storage? If not, the link you get from AI may expire…

Dude, one insight I give you is to treat the response, it could be a problem in the API or sending wrong parameters, if you treat the responses, users will have a better interaction with the system.

Hey,

I’ve worked with Bubble webhooks extensively and have encountered similar issues before. Here are some troubleshooting steps to help ensure your webhook reliably updates your database:

  1. Check if the Webhook is Firing Every Time
  • In your API logs (Settings → Logs → Server Logs), see if the webhook request appears when the issue occurs.
  • Use a tool like Webhook.site to test if the external service is always sending the webhook correctly.
  1. Confirm the Workflow is Executing
  • In Backend Workflows → API Workflow Logs, check if Bubble is detecting the webhook.
  • If the webhook doesn’t appear, Bubble may be rejecting it. Make sure your API endpoint is public and configured to accept the request format.
  1. Ensure Correct Data Matching
  • Since the webhook is meant to update an existing record, confirm that the unique ID or reference field in your database correctly matches the webhook payload.
  • Try adding a “debug mode” step in the workflow to log the webhook data.
  1. Add a Backup Polling Mechanism
  • If webhooks fail intermittently, consider setting up a scheduled API request to check for image completion after a delay (e.g., every 5 minutes).
  1. Use Backend Workflow Retries
  • If your webhook depends on an external service, add a retry mechanism using “Schedule API Workflow” with a short delay.