Using Sentinel and Autotasks to send txns

Hi I'm trying to handle this simple use case through Relay, Sentinel and Autotask

  • Listen for events from a certain contract
  • If this event parameters are matching filter conditions, execute a contract txn from Relayer using the event info

In Sentinel, I can define Custom Conditions through Autotask, however it says "Note: This Autotask should only be used for filtering transactions." and expects a filtered array as a result instead.

Is there a way to trigger Autotask when a matching event happens, and execute the txn instead through Relay?

One way is to create an event listener on another service and call the Autotask through webhook, but it feels like there has to be a way to do this within the Defender environment only.

:computer: Environment


:1234: Code to reproduce


You can, it's very simple!

  • Create Autotask with trigger set as a webhook.
  • Set notification channel on your sentinel as webhook and enter URL that you get from that autotask

Request body sent from sentinel to autotask will contain useful information about transaction!

Best regards

Thank you Tim, super neat!