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

adityahubli
Giga Guru

Hello @Mike LHCG1 ,

First, create a Subflow to handle all automation operations. While creating the Catalog Task, ensure that the “Wait for Completion” checkbox is enabled, as shown in the attached image. After the Catalog Task is created, configure a Send Email action. Then schedule that  created subflow in your scheduled flow .

 

adityahubli_1-1766138035362.png

 

adityahubli_2-1766138084403.png

 

If this helps you then mark it as helpful and please accept the solution.

Warm regards,

Aditya Hublikar

Technical Consultant

 

adityahubli
Giga Guru

Hello @Mike LHCG1 ,

If my solution helps you then mark it as helpful and accept as solution.

Regards,

Aditya ,

Technical Consultant

Shaah
Mega Contributor

I’ll first explain why your current approach hits a limitation, then give you two correct implementation options, with Option A (recommended) being fully Flow Designer–driven and no scripting required.


Problem Restated (in platform terms)

  • A catalog item is scheduled weekly (Tuesday 1:30 PM).

  • The catalog item generates a task (sc_task) assigned to a user.

  • The user completes the work and closes the task.

  • At that moment, an email must be sent to a manager.

  • You want a clean trigger for the email without scripting.

Your challenge is that the scheduled trigger is tied to the catalog item, but the completion event happens on the task, which is a different record lifecycle.

This is a very common and very solvable design pattern in ServiceNow.


Why your current flow can’t “see” the task closure

Flow Designer scheduled flows are one-time triggers.
Once the catalog item is requested, that flow is done.

Key limitation:

A scheduled flow cannot wait or listen for downstream task state changes.

So instead of “polling” or querying the task (which is inefficient and brittle), you need to flip the design and let the task itself trigger the email.


Best-Practice Solution (Recommended)

Option A — Record-Based Flow on Catalog Task (No Scripting)

This is the cleanest, most scalable, and upgrade-safe approach.


Architecture Overview

You will have two flows:

  1. Flow 1 (already done)

    • Scheduled flow creates the catalog request weekly

  2. Flow 2 (new)

    • Record-based flow listens for task completion

    • Sends email to manager

Each flow has a single responsibility, which is exactly how ServiceNow expects you to design automation.


Step-by-Step Implementation


🔹 Step 1: Identify the correct table

Catalog tasks live in:

sc_task

That is the table you want to monitor.


🔹 Step 2: Create a Record-Triggered Flow

  1. Go to Flow Designer

  2. Create New Flow

  3. Select Trigger → Record

  4. Configure as follows:

Trigger configuration

  • Table: Catalog Task (sc_task)

  • When: Updated

  • Condition:

    • State changes to Closed Complete

    • (Optional but recommended)

      • Request Item.Catalog Item = your specific catalog item

This ensures the flow only runs for this scheduled task.


🔹 Step 3: Get the Manager (No Script)

You have multiple no-code options:

Option 1: Manager of the Assignee (Most common)

  • Use Data Pill:

    Assigned to → Manager → Email

Option 2: Manager stored on the Request

  • If your catalog item captures a manager:

    Request Item → Requested For → Manager → Email

Option 3: Static manager or group email

  • Use a fixed email or distribution list


🔹 Step 4: Send the Email

Add an Action → Send Email

  • To: manager email (from step above)

  • Subject:
    Weekly Task Completed – ${Catalog Task Number}

  • Body (example):

    Hello,
    
    The weekly scheduled task ${number} has been completed.
    
    Completed by: ${assigned_to}
    Completed on: ${closed_at}
    
    Regards,
    ServiceNow

Use data pills only — no scripting required.


🔹 Step 5: Activate & Test

  • Wait for the next scheduled run or manually create a test catalog task

  • Close the task

  • Confirm email fires immediately


Why This Is the Correct Design

✔ Event-driven (no polling, no querying)
✔ Zero scripting
✔ Scales to hundreds of tasks
✔ Easy to maintain
✔ Clear audit trail
✔ Aligns with ServiceNow architecture

This pattern is far superior to trying to extend the scheduled flow.


⚠️ What NOT to Do (Anti-Patterns)

Querying tasks in a scheduled loop
Using “Wait” actions for long durations
Business Rules for simple notifications
Scripted email triggers for standard lifecycle events

Those approaches work initially but break at scale.


Alternative (Only if you need advanced logic)

Option B — Flow on sc_req_item (Less precise)

You can trigger on:

Request Item → State changes to Closed Complete

But:

  • RITM may close before the task

  • Not reliable if multiple tasks exist

Use this only if task-level precision is not required.


Final Recommendation (TL;DR)

Do not try to extend your scheduled catalog flow.
Create a second, record-triggered flow on sc_task that fires when the task closes and sends the email.

This is exactly how ServiceNow architects design recurring operational work.

Please Mark Helpful if you find this useful and Accept it as a Solution if find it correct.
SHAAH ABIIR AL KHALID
LinkedIn : https://www.linkedin.com/in/shaah/

Mike LHCG1
Tera Contributor

Hi Shaah,

 

Thank you for the detailed response. I know it took quite a while to write it so please know that your response is greatly appreciated.

 

I want to outline what you stated to make sure I understand. First, I believe you stated that I can use the flow where I trigger the catalog item that contains the task that is sent to the assignee. Now I need to create a second flow to watch for the completed task and when it is found to be closed complete, the email is sent.

For the 2nd flow I want to look for the completed task for the catalog item that was submitted, and when it's found to be completed, the email is sent. Basically the 2nd flow is always watching for when the task is complete. Is this all correct so far?

 

Now in step 2 the condition is: 

  • Condition:

    • State changes to Closed Complete

    • (Optional but recommended)

      • Request Item.Catalog Item = your specific catalog item

Are you saying the "State changing to Closed Complete" is optional  but recommended or that "Request Item.Catalog Item = your specific catalog item" is optional  but recommended? I ask because to me, they both seem like they're needed.

 

I also don't see how/where  to specify "Request Item.Catalog Item = your specific catalog item"

 

Thank you!

 

Mike