Out of office Deactivated User

1,326 views
Skip to first unread message

Manish Nair

unread,
Aug 10, 2023, 11:21:38 PM8/10/23
to GAM for Google Workspace
Hi There,

How to configure out of office for a user who has left the company and his account is deactivated.


Kevin Schofield

unread,
Aug 11, 2023, 10:29:20 AM8/11/23
to GAM for Google Workspace
In short you can't.
However there is a workaround, change the email address on the deactivated account.  Then create a group with the email address and set an auto-reply message in the group settings.

Manish Nair

unread,
Aug 14, 2023, 10:52:32 PM8/14/23
to google-ap...@googlegroups.com

thanks, Kevin, I will use that option.

The contents of this email message and any attachments are intended solely for the addressee(s). It may contain confidential and/or privileged information and may be legally protected from further disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited and may be unlawful. 

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/1006b739-2a0c-49c6-8944-61809f93d901n%40googlegroups.com.


--
 

Manish Nair
Systems Administrator
E:mn...@jobadder.com
P:02 8005 5711​
W:www.jobadder.com
-
TwitterLinkedInInstagramFacebook

awards

Jake Cozart

unread,
Jun 3, 2025, 2:19:26 PM6/3/25
to GAM for Google Workspace
I know that, at this point, this thread is a bit old but because it could help other users out there I wanted to post my solution. We forwarded an email from an former employee to a group but the group is generic and also receives mail from other sources (APIs, integrators, alerts, etc). We wanted to send replies selectively to the folks that emailed the former employee but not other folks that messaged the group directly. 

Since Google Groups does not support native conditional auto-replies such as replying only to emails originally addressed to a deprecated account or filtered by subject, we came up with this workaround: Use a Member Account to Monitor and Reply on Behalf of the Group

If you're a member of the Google Group with permission to post as the group, you can set up an auto-reply script in your account to monitor group traffic and send replies using the group's identity (assuming you have Send-As rights for the group).


Sample Google Apps Script

This script runs in a Google Workspace user account that’s a member of the group. It detects messages with a subject tag (e.g., [FORMER]) and replies using the group’s address.

---

function autoReplyToTaggedEmails() {
  const labelName = "AutoReplied";
  const label = getOrCreateLabel(labelName);
  const threads = GmailApp.search('subject:[FORMER] is:inbox -label:' + labelName + ' newer_than:1d');

  for (const thread of threads) {
    const message = thread.getMessages().pop();
    const recipient = message.getFrom();
    const subject = "Re: " + message.getSubject();

    GmailApp.sendEmail(recipient, subject,
      "This address is no longer monitored. Your message has been forwarded to the appropriate team.",
      {
        from: "your-...@domain.com", // You must have Send As permission for this
        name: "Your Team Name"
      });

    thread.addLabel(label);
  }
}

function getOrCreateLabel(name) {
  const label = GmailApp.getUserLabelByName(name);
  return label || GmailApp.createLabel(name);
}

---
Setup Instructions
  • Go to https://script.google.com and create a new project.

  • Paste in the code above.

  • In Gmail, make sure you've added the desired alias under Settings > Accounts > Send mail as.

  • Set a time-based trigger in Apps Script to run the function every 10 minutes.


Reply all
Reply to author
Forward
0 new messages