Allow multiple hooks in one event rule and set their execution order #11660

Closed
opened 2025-12-29 21:48:13 +01:00 by adam · 1 comment
Owner

Originally created by @4ydan on GitHub (Sep 29, 2025).

NetBox version

v4.4.1

Feature type

Change to existing functionality

Proposed functionality

When creating an event rule, one can assign multiple webhooks and their execution order.

  • Replace single webhook dropdown with a sortable multi-select interface, making the execution order the sort order.
  • Add one field for delay between each webhook. The delay is the time when the webhook gets added to the rq.
  • Continue or not execution if one webhook fails? (also a checkbox maybe?)

Use case

I have multiple webhooks which trigger when VM's are updated, but it is important to me in which order they are executed. Also I would like to group these webhooks together in one event rule.

Currently I have to create multiple event rules with almost the same conditions and objects, which is also error prone when creating new event rules for new tenants etc...

Database changes

  • Modify the relationship between event rules and webhooks from one-to-one to one-to-many
  • Expand the webhook model to contain a field for execution_order
  • Migrate existing event rules: convert single webhook reference to the new many-to-many relationship with execution_order=0

External dependencies

Originally created by @4ydan on GitHub (Sep 29, 2025). ### NetBox version v4.4.1 ### Feature type Change to existing functionality ### Proposed functionality When creating an event rule, one can assign multiple webhooks and their execution order. - Replace single webhook dropdown with a sortable multi-select interface, making the execution order the sort order. - Add one field for delay between each webhook. The delay is the time when the webhook gets added to the rq. - Continue or not execution if one webhook fails? (also a checkbox maybe?) ### Use case I have multiple webhooks which trigger when VM's are updated, but it is important to me in which order they are executed. Also I would like to group these webhooks together in one event rule. Currently I have to create multiple event rules with almost the same conditions and objects, which is also error prone when creating new event rules for new tenants etc... ### Database changes - Modify the relationship between event rules and webhooks from one-to-one to one-to-many - Expand the webhook model to contain a field for execution_order - Migrate existing event rules: convert single webhook reference to the new many-to-many relationship with execution_order=0 ### External dependencies -
adam added the type: feature label 2025-12-29 21:48:13 +01:00
adam closed this issue 2025-12-29 21:48:14 +01:00
Author
Owner

@jnovinger commented on GitHub (Oct 2, 2025):

Webhook ordering and execution flow should be handled on the receiving side rather than within NetBox's event system. If you need complex orchestration between multiple webhooks, consider using an external workflow system that NetBox triggers.

@jnovinger commented on GitHub (Oct 2, 2025): Webhook ordering and execution flow should be handled on the receiving side rather than within NetBox's event system. If you need complex orchestration between multiple webhooks, consider using an external workflow system that NetBox triggers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11660