Use Terraform to manage Webhooks in Kubiya:

terraform {
    required_providers {
      kubiya = {
        source = "kubiya-terraform/kubiya"

provider "kubiya" {
  //Your Kubiya API Key will be taken from the 
  //environment variable KUBIYA_API_KEY
  //To set the key, please use export KUBIYA_API_KEY="YOUR_API_KEY"

resource "kubiya_webhook" "webhook" {
  name = "tf-webhook"
  filter = ""
  prompt = "send john.doe@kubiya.ai a summary of all pull requests created in API-GW repo based on the commits and add the link of the pull request to the message"
  source = "Github"
  agent = kubiya_agent.my_agent.name
  destination = "john.doe@kubiya.ai"
  created_by = "john.doe@kubiya.ai"

output "webhook" {
  value = kubiya_webhook.webhook

Once your webhook is created successfully, you webhook_url field will be accessible and will serve in any use-case.

Last updated