- Issue created by @kopeboy
- 🇺🇸United States freelock Seattle
All that needs to happen for this is creating some plugins -- and probably not many.
Event plugin -- Webhook received
Action plugin -- Send webhook... since Webhooks are entities, much of the normal entity ECA plugins should already work. Are there any other plugins we need?
- 🇩🇪Germany sanduhrs 🇪🇺 Heidelberg, Germany, Europe
How would we gain access to the json serialized webhook payload and headers?
- 🇺🇸United States freelock Seattle
ECA largely uses the token system to access data. So if there's an Event plugin that is dispatched when a webhook is received, that plugin would define what tokens are available -- presumably the headers, payload, etc.
Likewise, for sending a webhook, the action plugin(s) might have different options for taking a pre-serialized JSON string, or automatically serialize an object or array to JSON -- those are the main decisions that need to be made. Can start with a simple case...
- 🇺🇸United States freelock Seattle
So I wanted to actually use this, and am vibe-coding a plugin -- and I see a bunch of work going into the 4.0.x-dev branch around the new webhook entities? That seems like a great improvement -- and I see the text on the project page saying this now works with standard entity events so we get ECA integration for free.
How far along is this? Is it ready to go? Is a generic webhook handler event still useful?
Have a prototype created, going ahead and sharing. This is probably more relevant for the 3.x branch, so setting back to that...
- Merge request !36Issue #3415357: Create ECA event plugin for Webhook Received → (Open) created by freelock
- 🇺🇸United States freelock Seattle
Pushing up to a production instance for internal testing now.
- 🇺🇸United States freelock Seattle
This is working as expected! Tested with two different inbound webhooks.
New Webhook Received event, provides the full webhook structure as [event:webhook], with the payload under [event:webhook:payload]. You can use the "deserialize" action to turn the payload into a data structure for access to what's sent in the payload. And when you add the event, you can select from a dropdown which webhook to trigger on, or all webhooks.