How do I trigger an email once a task completes when I submit a catalog item request via flow design

Mike LHCG1
Tera Contributor

Let me provide more detail.

I need to schedule a  task to run weekly at a certain time on a certain day that go's to an\ assignee to complete some work. Once that work is complete and the task is closed, I need to send an email to a manager to let them know it's been completed.

 

I created a catalog item that includes a task for the work. Then in Flow Designer, I scheduled that catalog item to run every Tuesday at 1:30pom (see attached). So far so good, it works great. Now, however, when the person that gets the task for that catalog item completes the work and closes the task, I need to send the email. This is where I need some assistance.  I'm not sure what I can use to trigger that email to send. My "Action" in Flow Designer was related to the catalog item. Without doing scripting, is there some way to query the task for that catalog item to see if it's been closed so I can use that as a trigger for the email...or is there a better way to implement this? Thanks!

 

13 REPLIES 13

@Mike LHCG1 

the link I shared has approach in it

did you check and explore that?

where are you stuck?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Akshay37
Giga Guru

@Mike LHCG1 ,

 

You can do it in multiple ways,

1) you can directly create a notification on catalog task table where you can specify trigger as inseted/updated and click on updated checbox and also in condition specify the condition as state changes to close complete.
2) You can use action send email/notification after waiting in a flow till task gets close complete

3) You can trigger the event after task gets completed.

 

If this response helps you mark it as helpful so that it will help others
Thanks,

Akshay 

nayanmule
Tera Guru

The task are you talking about is it a Catalog task created as part of that RITM ?  or Are you considering a RITM as a (work) task ?

If you have already a separate flow for your Catalog Item that you are submitting (Building B Level..) then in that flow itself you can add a wait condition to check if your catalog task or RITM is closed complete or not. Once, it's Closed , you can use Send Email action and design your email in the Flow designer itself.

 

If you don't want to edit the flow , you can still create a standalone notification to send it to the Requestor's manager once the RITM is Closed.

 

If my response helped you, kindly mark it as helpful and accept the solution.

Regards,

Nayan

Hi Nayanmule,

 

Thanks for your response.

 

Just to review, there is a catalog item in our service catalog and the only thing it does is create a task that is assigned to a specific person to complete some work...there are no variables, etc. That catalog item is triggered once a week by the flow in flow designer and that flow does nothing else. The person assigned the task may not complete it right away...it could take a few days, so I may be wrong, but i don't believe a wait condition is viable, and I don't know how to query if the task from the submitted catalog item is complete. How would I do that in the flow? I'm confused as to how the flow would know a task closed 3 days later is related to it. Thank you.

@Mike LHCG1  , you are just adding a wait for condition for catalog task is not enough. The better way to handle this to do outside the flow designer.

 

You can create a standalone notification on the 'sc_task' table.

you can give the conditions like Requested Item -> Item -> Building Level1 B(name of you catalog item) and State is -> Closed Complete.

 

If my response has helped you, kindly mark it as helpful and accept as solution to help the future readers.

 

Regards,

Nayan