Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Reply inbound email action ignoring execution condition when the referenced record does not exist - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Reply inbound email action ignoring execution condition when the referenced record does not exist
KB0635434

Reply inbound email action ignoring execution condition when the referenced record does not exist


8948 Views Last updated : May 10, 2023 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Description

Reply inbound email action ignoring execution condition when the referenced record does not exist and executes the inbound email action even though the condition to do so is never met.

Steps to Reproduce

  1. Modify OOB inbound action 'Update Incident (BP)' as follows:
    • Action type = Reply Email
    • Order = 25
    • Conditions:
      • Subject contains Arrangements: and
      • Subject is not empty
    • Condition:
      email.subject.indexOf("Arrangements:") >-1
    • In actions add some text to Reply email
  2. Create an incident making the caller, and assigned to a user in sys_user that has your @servicenow.com email address. This should send an outbound email to your account by either notification Incident opened for me and/or Incident assigned to me
  3. Delete the incident created in step 2.
  4. When the email arrives at your email client select Reply and send the reply back
  5. When the email is processed on the instance this is in the log for the received email:
    • Created Reply Message for Update Incident (BP)

      This should not happen since the conditions have not been met for the Update Incident (BP) inbound action
  6. To test that the condition is indeed correct, repeat steps 2 and 4. For example, skip deleting the new incident, when the Reply email is processed, the inbound action Update Incident (BP) is not executed since the conditions are not met:
    • Skipping Update Incident (BP), condition subjectLIKEArrangements:^subjectISNOTEMPTY^EQ failed.

The condition is apparently not being checked in the error case when the incident record is not found, but it should be. This results in the inbound action being incorrectly executed and sends the reply email when it shouldn't.

Workaround

There is no way to use reply email restricted by conditions when the target record does not exist. The route to go is to make your own reply email. This can be done using Email Service. Ref.:https://docs.servicenow.com/csh?topicname=email-service.html&version=latest

Sample code:

var replyEmail = new SNC.Email();
replyEmail.to = [email.from];
replyEmail.subject = "Re: " + email.subject;
replyEmail.text = "Reply Email";
replyEmail.html = "<body><h1>Reply Email.</h1><p>Details.</p></body>";
SNC.EmailService.send(replyEmail);
// We'll create text from html or html from text if you leave one of them off
 
This code should be placed in the Script actions section. Note that in some releases the html validation of requires xhtml, so if you are having problems getting emails to generate, set the property glide.email.body_html_validation_rule to none.
 
Alternatively, a sys_email record could be manually generated, but Email Service is the advised route.

Related Problem: PRB1159099

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.