# Implementing webhooks for the Calendar plugin

**URL:** https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366
**Category:** Feature
**Tags:** events
**Created:** [January 28, 2025, 12:38pm UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366 "2025-01-28T12:38:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![manut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manut/32/485119_2.png) [@manut](https://meta.discourse.org/u/manut)
#### Post date: [January 28, 2025, 12:38pm UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366/1 "2025-01-28T12:38:22Z")

</div>

Hello !

I wanted to know if you’re interested by the implementation of a few webhooks for the Calendar plugin.

I can work on it if the community feels like it would be a good addition to the plugin…

That being said, it will take time as I cannot find a proper documentation on how to implement webhooks in a plugin, and will have to do some research 🙂

---

<div class="post-metadata">

### Author: ![tvavrda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tvavrda/32/480674_2.png) [@tvavrda](https://meta.discourse.org/u/tvavrda)
#### Post date: [January 28, 2025, 12:54pm UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366/2 "2025-01-28T12:54:07Z")

</div>

Do you have some interesting use cases? What operations would you implement? Create/update/delete/event sign up/event sign out?

---

<div class="post-metadata">

### Author: ![manut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manut/32/485119_2.png) [@manut](https://meta.discourse.org/u/manut)
#### Post date: [January 28, 2025, 1:56pm UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366/3 "2025-01-28T13:56:13Z")

</div>

Yes, these are the events I want to create for now; the use case being to trigger an external event management platform.

The next question will be to be able to accept hooks _from_ the remote platform, but I may create a separate plugin for it as it can’t be generic (my first guess) unless we implement support for iCal format (but still, I already can see a lot of limitations to this).

---

<div class="post-metadata">

### Author: ![manut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manut/32/485119_2.png) [@manut](https://meta.discourse.org/u/manut)
#### Post date: [January 29, 2025, 9:28am UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366/4 "2025-01-29T09:28:35Z")

</div>

I found an official plugin with webhook extensions : [GitHub - discourse/discourse-solved: Allow accepted answers on topics · GitHub](https://github.com/discourse/discourse-solved).

So I can start working on the implementation if there is no objection 🙂

---

<div class="post-metadata">

### Author: ![manut](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manut/32/485119_2.png) [@manut](https://meta.discourse.org/u/manut)
#### Post date: [January 29, 2025, 11:30am UTC](https://meta.discourse.org/t/implementing-webhooks-for-the-calendar-plugin/349366/5 "2025-01-29T11:30:38Z")

</div>

I dug into the code and I found that’s not as easy as it _should_ to add new webhooks.

- Webhooks are part of a group of webhooks (I guess it’s for the admin and/or to namespace events)
- For the Solved plugin, there are 2 webhooks: `solved_accepted_solution` and `solved_unaccepted_solution`, in the `solved` group

Where it goes wrong is:

- the `solved` group is hardcoded in the `WebHookEventType` model of Discourse
- the two events are also hardcoded in the `WebHookEventType` model of Discourse

I’ll see if and how I can manage to still declare new events without to have to touch to the Discourse code…
