We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How can we allow Out Of Office/auto reply mails to be received and processed on tickets?

dhruvsinghp
Tera Contributor

How can we allow Out Of Office/auto reply mails to be received and processed on tickets?

I m looking for guidance on how to allow Out of office ( OOO ) response and other automatic replies to be received and processed against tickets in Servicenow instance.

 

We often send emails to external vendors directly from Servicenow and many of them have OOO replies that include alternative contacts or additional instructions to follow up/solve the ongoing issues mentioned through tickets. These replies would be helpful for teams who looking over these tickets. 

In addition to vendor replies, it would also be useful if we could receive OOO responses from internal users, since these often provide information such as return dates or backup contacts.

 

For clarity, Auto replies like we configure them in MS teams/outlook where we schedule an OOO period and set an auto reply message by enabling "Send replies outside my organization" and "Send replies during specific period". There the OOO emails we would like Servicenow to receive.

 

My questions are :

1. Is there any way to implement this and update through ticket like a comment or work note ?

 

2. Are there any best practices to achieve this safely without causing mail loops or allowing unwanted automated emails? For example, controlling which headers/subjects are allowed or only enabling for trusted 

sender domains.

 

3. For cases where vendors' OOO replies aren't sent at all, is adjusting outbound headers necessary to ensure external systems generate auto-replies?

 

If anyone has implemented this before, please reply this and let me know any insights, configurations steps , references , examples or any one of you which you had come across like this above mentioned similar situation steps taken to get out this. I'd appreciate for your help and kudos to your efforts.

2 REPLIES 2

Itallo Brandão
Tera Guru

Hi @dhruvsinghp ,

This is a classic "Double-Edged Sword" requirement. While capturing OOO (Out of Office) replies is incredibly valuable for Vendor Management (knowing who to contact next), enabling it opens the door to the dreaded Email Loop (ServiceNow emails Vendor -> Vendor auto-replies -> ServiceNow updates ticket -> ServiceNow emails Vendor -> Repeat until crash).

Here is the architectural guide to doing this safely.

1. The Implementation (How to allow them in)

By default, ServiceNow has Inbound Actions or filters that ignore emails with headers like X-Auto-Response or subjects starting with Out of Office.

To capture these without opening the floodgates to spam, create a specific Inbound Action.

Step-by-Step:

  1. Navigate to: System Policy > Email > Inbound Actions.

  2. Create New Action:

    • Name: Process Vendor OOO

    • Target Table: Incident (or Case/Task)

    • Action Type: Record Action

    • Order: Lower than your standard "Ignore spam/auto-replies" rule (e.g., if "Update Incident" is 100, make this 50).

  3. Conditions:

    • Subject CONTAINS "Out of Office" (or "Auto Reply" / "Abwesenheitsnotiz")

    • Optional: Sender IS [Trusted Vendor Domain] (For extra safety).

  4. The Script (Crucial for Loop Prevention): Instead of adding a public comment, add it to Work Notes.

    JavaScript
     
    // 1. Add the OOO message to Work Notes (Internal Only)
    // This prevents the system from sending a "Ticket Updated" notification back to the vendor
    current.work_notes = "[Vendor OOO Received] \n" + email.body_text;
    
    current.update();
    
    // 2. Stop Processing
    // This prevents other rules (like the standard 'Ignore' rule) from running afterwards
    event.state = "stop_processing"; 


2. Best Practices for Loop Prevention (Question 2)

The Golden Rule: Never allow an auto-reply to trigger another notification.

  • Use Work Notes: As shown in the script above, by updating work_notes, you ensure the data is captured for your agents, but since work_notes are internal, they (usually) do not trigger an email back to the caller. This breaks the loop instantly.

  • Update Notification Conditions: Check your "Incident Commented" notifications. Ensure they have a condition: Updated By IS NOT guest (or whatever user the OOO comes from).


3. Handling Outbound Headers (Question 3)

You asked: "Is adjusting outbound headers necessary to ensure external systems generate auto-replies?"

Yes, in some cases. ServiceNow sends emails with headers like Precedence: bulk or Auto-Submitted: auto-generated.

  • The Issue: Microsoft Exchange and Gmail are smart. They often suppress OOO auto-replies to emails marked as "Bulk" or "Auto-generated" to prevent internet-wide spam storms.

  • The Fix: You can change this by removing the Precedence: bulk header for specific high-priority notifications sent to vendors.

    • Warning: Removing these headers increases the risk of your instance being flagged as spam by receiving mail servers, as you are technically sending automated mail that looks like "human" mail. Only do this for specific, high-value vendor notifications, not global system blasts.

Summary:

  1. Create a specific Inbound Action with a low Order number.

  2. Script it to update Work Notes only (this is your safety net).

  3. Add event.state = "stop_processing" so it doesn't get ignored by subsequent rules.

If this guide helps you configure the logic safely, please mark it as Accepted Solution.

Best regards,
Brandão.

dhruvsinghp
Tera Contributor

Sorry for delay got stuck with other sc_tasks, incidents , Thanks for your contribution. I will look into this. Discuss with this my fellow teammates. Soon update you upon this solution