# Trying to trigger a workflow based on an event

**URL:** <https://developer.sailpoint.com/discuss/t/trying-to-trigger-a-workflow-based-on-an-event/20653>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud\
**Created:** [November 8, 2023, 3:38pm UTC](https://developer.sailpoint.com/discuss/t/trying-to-trigger-a-workflow-based-on-an-event/20653 "2023-11-08T15:38:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [December 14, 2023, 2:50pm UTC](https://developer.sailpoint.com/discuss/t/trying-to-trigger-a-workflow-based-on-an-event/20653/7 "2023-12-14T14:50:37Z")

</div>

I would avoid using the scheduled search trigger since it only shows a preview of the first 20 records. You may very well have more users doing a password reset than 20. Instead, I would setup a “Scheduled Trigger” to run at a set interval (ex. every hour), and have the workflow invoke an HTTP Request to the search API. The search request will use the query that @edmarks provided above:

> [@edmarks](#):
>
> Looking at the Admin → Dashboard there’s a “Password Resets” section on here. Clicking the “View All” opens up Search with the following query:  
> technicalName:PASSWORD\_ACTION\_CHANGE\_PASSED AND created:[now-7d/d TO now]

As for an example of how to setup this workflow, check out the first 20 minutes from this livestream that I recorded.

> [@Developer Live Stream - Workflows Tips, Tricks, & Best Practices](https://developer.sailpoint.com/discuss/t/developer-live-stream-workflows-tips-tricks-best-practices/14116):
>
> This month, we’ll end the year hearing from @colin_mckibben as he teaches us best practices, tips, and tricks to master the art of building workflows in IdentityNow. Whether you’re a novice or an expert, join us to learn something new!

The use case I cover in the video is for new user onboarding, but it can easily be adapted to search for identities that do a password reset instead. You’ll want to grab the templates from here.

> [@Developer Live Stream - Workflows Tips, Tricks, & Best Practices](https://developer.sailpoint.com/discuss/t/developer-live-stream-workflows-tips-tricks-best-practices/14116/7#templates-for-new-user-onboarding-1):
>
> As promised, here are the templates and blog posts you’ll need to explore these concepts on your own. Templates for new user onboarding [NewUserOnboardingEmailTemplate.json](https://developer.sailpoint.com/discuss/uploads/short-url/dsfREI22Q4ysI91hRwp4vtHX5di.json) (1.8 KB) [ProcessNewUserOnboardingEmailTemplate.json](https://developer.sailpoint.com/discuss/uploads/short-url/r0bbhjGOGsMOQf2eZPQrHKxznLB.json) (4.4 KB) Object owner reassignment Blog post: Templates: [https://developer.sailpoint.com/discuss/t/reassigning-object-owners-workflow/22370](https://developer.sailpoint.com/discuss/t/reassigning-object-owners-workflow/22370)Request response type triggers Blog post: Workflow templates are at the bottom of the blog.

---

_[View the full topic](https://developer.sailpoint.com/discuss/t/trying-to-trigger-a-workflow-based-on-an-event/20653)._
