Hi everyone,
I’ve implemented a custom app with shared webhooks for a few scenarios, which works well so far. The idea is the following:
- My application is running on multiple webservers/domains each with their own api key
- Customers using my applications create scenarios using provided templates and connect it with their own api key (using their own quotas and allowing them to customize the workflows to their liking)
My issue is I can’t find any option to detect whether the call to the webhook is actually handled by any scenario. For example I have 2 instances (lets call them “A” and “B”) of my application with their own api keys. For instance A i have scenarios setup, which work fine and deliver the result via api actions. For instance B there are no scenarios setup and calls to the webhook with their api key return “Accepted” but just vanish into the void.
I would like to have one or both of the following options:
- Detect a webhook call that is not handled and notify the customer to setup the missing scenario
- Have a fallback scenario that handles all webhook calls with a “default scenario” unless the customer has defined a custom one
My ideas to handle that right now are the following:
- Log calls to the webhooks and flag them as faulty/missing if there is no response via api action within a given timeframe (not ideal since there is a significant delay before being able to provide the customer with proper assistance)
- Implement webhook attach/detach/update events and keep track in a database
- Before sending the webhook check with the database whether a scenario is attached and fail if not
- For fallbacks I would have to replace the api key with a “default/fallback key” and somehow tag along the original one to deliver the result to the proper instance?
Is there any easier way then the two options I just mentioned to detect whether the call is actually being handled?
PS: Is there any documentation on how the attach/detach/update calls are defined? I couldn’t find any examples in the documentation at Shared | Make Developer Hub