Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

WorkFlow Notification

dixitreddy
Tera Contributor

Hi

my requirement is in catalog item if catalog task is in open(not closed) then it should trigger email after 1 day if task is still in open state ,like wise after 3 days,7 days,15 days  if it is closed at after 3 days remaining notifications should not trigger this should be done using workflow

6 REPLIES 6

hi @dixitreddy 

If you want to utilize existing workflow then you can modify above workflow as bellow:

- After each 'Timer' add one 'Run script' and check the state of your task "current.state != 'Closed'"

- you need to add two conditions as 'True' and 'False' for your run script.

- Here i am providing sample script which you can utilize in your 'Run script'

 

// Check if the current state of the task is not 'Closed'
if (current.state != 'Closed') {
    // Continue the workflow (return true)
    return true;
} else {
    // End the workflow or do not continue (return false)
    return false;
}

 

i hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.

thank you

rajesh

 

Ashish Parab
Mega Sage
Mega Sage

Hello @dixitreddy 

 

You can achieve this by creating a flow.

 

  • Create a Flow:

    • Trigger: Catalog Task is created or updated.
    • Condition: Check if the state of the task is "Open."
  • Wait and Condition Logic:

    • Use a Wait for condition action in the flow to wait for 1 day.
    • After waiting for 1 day, add a condition to check if the cat task state is still "Open."
    • If it's still open, send an email.
  • Repeat for other intervals:

    • After the email is sent, use another Wait for condition to wait for 2 more days (total 3 days), then repeat the condition check and send an email if needed.
    • Follow similar steps for 7 days and 15 days.

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish