# Create notification (like a sentinel) when a scheduled autotask returns a certain value

**URL:** <https://forum.openzeppelin.com/t/create-notification-like-a-sentinel-when-a-scheduled-autotask-returns-a-certain-value/33646>\
**Category:** Defender\
**Tags:** defender\
**Created:** [December 11, 2022, 8:17am UTC](https://forum.openzeppelin.com/t/create-notification-like-a-sentinel-when-a-scheduled-autotask-returns-a-certain-value/33646 "2022-12-11T08:17:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frontier](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frontier/32/17143_2.png) [@frontier](https://forum.openzeppelin.com/u/frontier)\
**Post date:** [December 11, 2022, 8:17am UTC](https://forum.openzeppelin.com/t/create-notification-like-a-sentinel-when-a-scheduled-autotask-returns-a-certain-value/33646/1 "2022-12-11T08:17:18Z")

</div>

Hi,

Is it possible to create a notification (eg discord, like a sentinel can) based off the return value from a scheduled autotask?

Right now, I can create a separate sentinel and alert based off the on-chain action the autotask performed (when mined, based off evm events), but I'd really like to also create an alert when my autotask performs a certain action.

It would be a great use case to handle where I can alert based off the action the autotask attempted.

**💻 Environment**  
Autotask

**📝Details**

**🔢 Code to reproduce**

```auto
export async function handler(event: AutotaskEvent): Promise<MyReturnValues> {
    if (someFunc()) {
        return { 
            'raiseAlert': true,
            'foo': 'bar',
        };
    } else {
        return { 
            'raiseAlert': true,
            'foo': 'blah',
        };
    }
}

```

---

<div class="post-metadata">

**Author:** ![zeljko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/zeljko/32/14206_2.png) [@zeljko](https://forum.openzeppelin.com/u/zeljko)\
**Post date:** [December 12, 2022, 7:36am UTC](https://forum.openzeppelin.com/t/create-notification-like-a-sentinel-when-a-scheduled-autotask-returns-a-certain-value/33646/2 "2022-12-12T07:36:19Z")

</div>

Hi @frontier

This feature is currently in development, and it should be published in upcoming weeks(before end of year).

Best,  
Zeljko
