Skip to content

Add support for jinja2 custom filters for webhooks #9501

@tom0010

Description

@tom0010

NetBox version

v3.2.3

Feature type

Change to existing functionality

Proposed functionality

When using webhooks, I'd like to have the ability to add some custom jinja2 filters.
Ansible comes with some nice ones, such as to_nice_yaml etc. however, I'd like to have the ability to add filters where you see fit.

Maybe something like https://github.com/tbotnz/netpalm-admin would work, where you can just paste the filter into the GUI and it'll be uploaded to the netbox instance, failing that, we could also add a jinja2_filters folder somewhere, where the user could just add the filters there. Similarly to the scripts design in Netbox.

Use case

It would allow users to customise the payload better when using webhooks.

Database changes

Not sure.

External dependencies

Jinja2

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions