# Webhook with ubiquiti protect

**URL:** https://community.homey.app/t/webhook-with-ubiquiti-protect/122324
**Category:** Questions & Help
**Tags:** webhook
**Created:** [December 2, 2024, 5:58am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324 "2024-12-02T05:58:56Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![tanwk3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tanwk3/32/1378_2.png) [@tanwk3](https://community.homey.app/u/tanwk3)
#### Post date: [December 2, 2024, 5:58am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/1 "2024-12-02T05:58:56Z")

</div>

I have tried using the logic in homey using the URL provided with the myevent tag and = it to a name and paste it into the customer webhook in ubiquiti protect alarm and set as POST and it doesnt work when triggered. Anyone facing the same issue? Or did i use a wrong webhook for this? Not expert with webhook need some help on this.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/3/a3ff87bd551e73606ad4beafa44c7a1145964fb9.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/6/4697288a52ced749617789c4a33bcb2279b767b3.png)

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [December 2, 2024, 6:34am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/2 "2024-12-02T06:34:46Z")

</div>

What’s the value of `(ⓐ Tag)` in the first card? It should be `my_event`

---

<div class="post-metadata">

### Author: ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)
#### Post date: [December 2, 2024, 7:35am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/3 "2024-12-02T07:35:34Z")

</div>

Just an FYI, Might not be possible to use a tag in the trigger card, and has to be written.

---

<div class="post-metadata">

### Author: ![tanwk3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tanwk3/32/1378_2.png) [@tanwk3](https://community.homey.app/u/tanwk3)
#### Post date: [December 2, 2024, 11:41am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/4 "2024-12-02T11:41:26Z")

</div>

what i did was … [https://webhook.homey.app/](https://webhook.homey.app/) [homey id] /my\_event?tag=fingerprint is place in unifi protect alarm webhook post  
where fingerprint is my tag value.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/b/7bc63b9ed1d23b281ff0af08b2cff6483f0c8bd3.png)

so in the trigger i check tag is exactly fingerprint.

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [December 2, 2024, 11:44am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/5 "2024-12-02T11:44:03Z")

</div>

> [@tanwk3](#):
>
> what i did was … /my\_event?tag=fingerprint  
> where fingerprint is my tag value.

The “When” card should contain the _event_ name, so `my_event`

---

<div class="post-metadata">

### Author: ![tanwk3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tanwk3/32/1378_2.png) [@tanwk3](https://community.homey.app/u/tanwk3)
#### Post date: [December 2, 2024, 11:52am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/6 "2024-12-02T11:52:29Z")

</div>

> [@tanwk3](#):
>
> [https://webhook.homey.app/](https://webhook.homey.app/) [homey id] /my\_event?tag=fingerprint

so putting this in the unifi protect UI for post  
[https://webhook.homey.app/](https://webhook.homey.app/) [homey id] /my\_event?tag=fingerprint is not correct? Cos my\_event doesnt has a naming convention here.

should i change to …my\_event=fingerprint?tag=yes

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [December 2, 2024, 11:59am UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/7 "2024-12-02T11:59:06Z")

</div>

If you have this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/8/38fc31a5f19b963472a361b9b3ea32202e18fffe.png)

The URL should be:

```auto
https://webhook.homey.app/[homey id]/event_from_ubiquiti?tag=fingerprint

```

---

<div class="post-metadata">

### Author: ![tanwk3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tanwk3/32/1378_2.png) [@tanwk3](https://community.homey.app/u/tanwk3)
#### Post date: [December 2, 2024, 12:09pm UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/8 "2024-12-02T12:09:37Z")

</div>

that works. thanks a lot. finally understand that statement in the icon.

---

<div class="post-metadata">

### Author: ![Ollem](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ollem/32/9413_2.png) [@Ollem](https://community.homey.app/u/Ollem)
#### Post date: [January 20, 2025, 1:55pm UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/9 "2025-01-20T13:55:37Z")

</div>

Any idea if it is also possible to pass json or variable from Unifi Protect?  
Or do I need to hard code each tag in Unifi Protect Alarm for Homey?

According to this article the Unifi HTTP POST Alarm should send additional information but I haven’t been able to capture it with ‘tag’:

> **[Send UniFi Protect Alerts to Web Services using Webhooks](https://help.ui.com/hc/en-us/articles/25478744592023-Send-UniFi-Protect-Alerts-to-Web-Services-using-Webhooks)**
>
> UniFi Protect custom webhooks make it easy to connect UniFi Protect with other web services. They allow you to automatically respond to alerts, improve monitoring, and scale effortlessly. With webh...

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [January 20, 2025, 2:01pm UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/10 "2025-01-20T14:01:43Z")

</div>

Homey’s webhooks are very limited, only “event” and “tag” (passed in the URL) are supported.

---

<div class="post-metadata">

### Author: ![Ollem](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ollem/32/9413_2.png) [@Ollem](https://community.homey.app/u/Ollem)
#### Post date: [January 20, 2025, 2:36pm UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/11 "2025-01-20T14:36:25Z")

</div>

Thanks for your reply!  
This triggered me to check if someone had made an alternative webhook app and there is 🙂

> **[Webhooks](https://homey.app/nl-nl/app/skogsaas.webhooks/Webhooks/)**
>
> Webhooks with full access to request headers, query and body

When using the webhook URL as can be found in the config of this app  
(e.g. [https://webhooks.athom.com/webhook/123456789abcde?homey=](https://webhooks.athom.com/webhook/123456789abcde?homey=)‘_homey id of your homey_’&event=‘_event name as defined in unifi protect_’)  
The json can now be read…

E.g. these Unifi Protect Alarm settings

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/0/20185b04addad784e4bd011a38d6bdb7e496ea11.png)  
now returns the expected json:

```auto
{
  "alarm": {
    "name": "Person of interest (Webhook)",
    "sources": [
      {
        "device": "E0631DABCDE",
        "type": "include"
      }
    ],
    "conditions": [
      {
        "condition": {
          "type": "is",
          "source": "face_of_interest"
        }
      },
      {
        "condition": {
          "type": "is",
          "source": "face_unknown"
        }
      },
      {
        "condition": {
          "type": "is",
          "source": "face_known"
        }
      }
    ],
    "triggers": [
      {
        "device": "E0631DABCDE",
        "value": "John Doe",
        "key": "face_known",
        "eventId": "678e5b1b022dd903e400e376"
      },
      {
        "device": "E0631DABCDE",
        "value": "John Doe",
        "key": "face_of_interest",
        "eventId": "678e5b1b022dd903e400e376"
      }
    ]
  },
  "timestamp": 1737382688066
}

```

---

<div class="post-metadata">

### Author: ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)
#### Post date: [January 20, 2025, 2:45pm UTC](https://community.homey.app/t/webhook-with-ubiquiti-protect/122324/12 "2025-01-20T14:45:46Z")

</div>

I forgot about that app 😅
