Cost-Effective Backend Workflow Trigger After Webhook Finishes Updating Fields

Hi Bubble community,

We’re working on a backend workflow that needs to trigger after receiving data through a webhook from a third-party app. The webhook updates several fields in our database—some fields are guaranteed to be populated, while others are optional. We need to ensure that the object is completely updated before the workflow runs, even if some optional fields remain empty.

Our initial approach was to use database triggers to monitor changes to these fields, which would ensure the workflow triggers only once all updates are done. However, we’ve realized that this method might become costly in terms of workflow units due to the need for constant monitoring, especially since some fields might take longer to update or never update at all.

We’re looking for a more cost-effective, backend-only solution that can handle this scenario. Ideally, the workflow should wait until the necessary fields are updated after the webhook data arrives and then proceed without needing continuous triggers.

Has anyone encountered a similar challenge and found an efficient approach? Any suggestions or best practices for this type of setup would be greatly appreciated!

Thanks in advance for your insights!

Try putting the initial ‘make changes to thing’ action in a custom trigger, so the webhook is recieved by backend workflow, the first action is to trigger the custom trigger to make changes to thing, then your second action is to schedule the other backend workflow…custom triggers will ensure your make changes to thing action is complete before the initial series moves to step 2…also for step 2 in order to ensure it runs when it should try utilizing the ‘return data’ function and just simply return from the custom trigger the ‘thing to change’ and for step 2 in initial series, use the returned data as reference for parameters in the schedule backend workflow that is the step 2.

This topic was automatically closed after 70 days. New replies are no longer allowed.