Skip to content

Webhook Jinja Templating Custom Fields #18125

Closed Answered by aascedu
aascedu asked this question in Help Wanted!
Discussion options

You must be logged in to vote

Yes, I figured it out, but it is messy. I think this is really not the way to go.

My webhook is triggered when a VLAN Object is created. Since I needed the django methods of this object, I created a netbox script that would receive exactly the infos I needed from the webhook and then did whatever I wanted it to, fetching the custom field data ? easy in a netbox script.

The webhook would trigger this script :

class WebhookVLAN(Script):
    class Meta:
        name = "VLAN"
        description = "VLAN webhook"
    CompteID = StringVar(
        description="Numero de Compte",
        required=True,
        label="CompteID",
    )
    EtsID = StringVar(
        description="Numero de Ets",
  …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aascedu
Comment options

Answer selected by aascedu
@Ferdbugs
Comment options

@aascedu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants