Retain messages in Google Chat and classic Hangouts with Vault

As part of your organization's information governance approach, you can control how long direct messages (DMs), group messages, and messages in rooms in Google Chat and classic Hangouts are retained. Use retention rules to set how long to keep messages and when to delete them, if ever.

Set custom retention rules to keep data that matches specific conditions for set time. Set a default retention rule when you need to keep all data for a service for all licensed accounts in your organization for a set time. Custom retention rules override default retention rules, even when the default retention rule has a longer retention period.

Before you set retention rules, we strongly recommend you read about how retention works.

WARNING: An improperly configured retention rule can allow Chat and classic Hangouts to immediately and irreversibly purge messages. Use caution when you create or change retention rules. We recommend that you test new rules on a small set of accounts before you apply the rules to your entire organization.

Important information about Chat retention

Open all  |  Close all

Retention rules and holds apply to messages only when history is on

Retention rules and holds always apply to rooms with threaded replies (conversations). However, they apply to DMs, group messages, and unthreaded rooms only when history is turned on.

A Google Workspace administrator can control whether history is on or off, or they can allow users to decide.

Retention coverage depends on the type of rule

The default retention rule applies to all DMs, group messages, and rooms in your organization.

A custom retention rule can apply to different sets of messages:

Organizational unit-based retention rule "All Chat spaces" retention rule
  • DMs in classic Hangouts and Chat
  • Group conversations in classic Hangouts
  • Group chats in Chat created before early December 2020
  • Threaded rooms (rooms with messages in conversations)
  • Unthreaded rooms (rooms with messages in a single thread, like DMs)
  • Group chats in Chat created after early December 2020
  • Group conversations synced to Chat from classic Hangouts, if your organization still has classic Hangouts turned on

If more than one custom retention rule applies to a message, the message is retained according to the custom rule that expires last.

To retain all messages (DMs, group messages, and messages in rooms) with custom retention rules, you must create at least two rules. You create one rule for all Chat spaces to cover messages in rooms and certain group chats, and create another rule for your top organizational unit to cover DMs and group messages.

Learn more about the differences between group messages and rooms.

Note: Unlike Gmail and Groups retention rules, you can’t use terms to target Chat retention rules to messages associated with specific accounts or that contain specific keywords.

Retention periods depend on who participates; messages in external rooms aren't retained

Direct messages

A DM is owned by each participant in a chat individually. When participants are in the same organization but covered by different retention rules, one participant might be able to access a DM while the other can’t.

For example, participant 1 is in an organizational unit subject to a retention rule that purges DMs after 7 days and they chat with participant 2 who’s in an organizational unit subject to an indefinite retention rule for DMs. Seven days after participant 1 sends or receives a DM with participant 2, participant 1 loses access to the DM. But, because participant 2’s DMs are retained indefinitely, the DMs aren’t purged and participant 2 still has access to them.

DMs with external users

When participants belong to different organizations, DMs are retained according to each organization’s retention rules.

For example, Company A retains DMs for 1 week and Company B retains DMs for 2 years. Vault handles DMs between users in Company A and Company B as follows:

  • Company A retains the DMs for 1 week, then any messages not already deleted are deleted. These messages are no longer available to Company A users. Chat has a 30-day retention period that keeps messages for 30 days after they're deleted. During that period, the messages are still available in Vault. After the Chat retention period ends, the DM is no longer available in Vault for Company A.
  • Company B retains the DMs, and can search and export them, for 2 years. After 2 years, any messages not already deleted are deleted and retained by the Chat 30-day retention period. After the Chat retention period ends, the DM is no longer available in Vault for Company B and is purged from Google systems.

Chat spaces

When you set a default retention rule or create a custom retention rule for Chat, Vault can retain messages only in Chat spaces that have history turned on. Chat retention rules set for organizational units don’t apply to messages in rooms.

External users in Chat spaces

When participants belong to different organizations, the conversation is retained according to the rules of the organization of the Chat space's creator. If users in your organization participate in Chat spaces owned by another organization, those messages aren’t available to Vault for retention, holds, search, or export.

When a retention period expires, Vault purges all covered Chat messages

Chat retention rules don't have the option to purge only messages deleted by users. A retention rule with an expiration purges all messages when the retention period expires.

Files directly attached to Chat messages are subject to Chat retention rules

When a user shares a file stored in Drive, such as a doc, sheet, or PDF, Chat inserts a link rather than attaching a copy of the file to the message. Because the original file is stored in Drive, it isn't retained when you retain chat messages. Set up a Drive retention rule to retain this data.

Other file types directly attached to a Chat message, such as PDFs, IMGs, DOCX, are covered by Chat retention rules.

Set a custom retention rule for Chat and classic Hangouts

These steps are for new Vault (vault.google.com). Go to steps for classic Vault

  1. Sign in to vault.google.com.
  2. Click Retentionand thenCustom Rulesand thenCreate.
  3. For the service, select Chat and then click Continue.
  4. Choose an entity:
    • To retain DMs and group conversations that were sent or received by accounts in an organizational unit, select Organizational unit. Click the organizational unit field and, in the dialog that opens, click the organizational unit. The rule doesn't apply to messages in rooms or group chats in Chat created after early December 2020.
    • To retain messages in all Chat spaces in your organization, select All Chat spaces. The rule doesn't apply to direct messages or some group messages.

    Review the differences between rule types.

  5. Choose how long to keep messages:
    • To permanently retain messages covered by this rule, choose Indefinitely.
    • To discard messages after a set time, choose Retention period and enter the number of days, from 1 to 36,500.
      Warning: Vault allows Chat and classic Hangouts to immediately purge data that exceeds the retention period when you submit a new rule. The purged data can include data that users expect to keep. Don't proceed to the next step until you’re sure the rule is configured correctly.
  6. Click Create. If you set a retention period, Vault asks you to confirm you understand the rule's effects. Check the boxes and click Accept to create the rule.

Set the default retention rule for Chat and classic Hangouts

These steps are for new Vault (vault.google.com). Go to steps for classic Vault

  1. Sign in to vault.google.com.
  2. Click Retention. The list of default rules opens.
  3. Click Chat "".
  4. Choose how long to keep messages:
    • To permanently retain messages covered by this rule, choose Indefinitely.
    • To discard all messages after a set time, choose Retention period and enter the number of days, from 1 to 36,500.
      Warning: Vault allows Chat and classic Hangouts to immediately purge data that exceeds the retention period when you submit the rule. The purged data can include data that users expect to keep. Don't proceed to the next step until you’re sure the rule is configured correctly.
  5. Click Save. Vault asks you to confirm you understand the rule's effects. Check the boxes and click Accept to save the rule.

Use classic Vault

Click below to open steps for classic Vault (ediscovery.google.com). Go to steps for new Vault

Set retention rules for Chat and classic Hangouts in ediscovery.google.com

Create a custom retention rule for Chat and classic Hangouts

You can create custom rules that apply to individual organizational units or to all rooms:

  1. Sign in to Vault(ediscovery.google.com).
  2. In the left navigation, click Retention.
  3. Click Create Rule.
  4. Choose where to apply the rule: Chat.
  5. Choose an entity:
    • Click organizational unit and choose a unit from the drop-down menu. The rule applies only to DMs and group messages that include a member of the organizational unit (not rooms).
    • Click all Chat spaces to create a rule that applies to rooms and certain group messages (not DMs).
  6. Choose how long to keep messages:
    • Choose indefinitely to permanently retain messages covered by this rule.
    • To discard messages after a period of time, enter the number of days, from 1 to 36,500.
    Warning:Vault immediately begins the process of purging data that exceeds the retention coverage period as soon as you submit a new rule. This can include data users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly. 
  7. Click Save. Before you create a retention rule that expunges all messages, Vault asks you to confirm you understand the effects of this retention rule. Check the boxes and click Confirm to create the rule.

Set the default retention rule for Chat and classic Hangouts

The default retention rule applies to all messages in your organization that are not covered by a custom rule or a hold.

  1. Sign in to Vault (ediscovery.google.com).
  2. In the left navigation, click Retention.
  3. Under Default retention rules, click Chat.
  4. Check the Set a default retention rule for Chat box.
  5. Choose how long to keep messages:
    • Choose indefinitely to permanently retain all messages.
    • To discard messages after a period of time, enter the number of days, from 1 to 36,500.
    Warning: Vault immediately begins the process of purging data that exceeds the default retention coverage period as soon as you submit this rule. This can include data users expect to keep. Do not proceed to the next step until you’re sure the rule is configured correctly. 
  6. Click Save. Before you create a retention rule that expunges all messages, Vault asks you to confirm you understand the effects of this retention rule. Check the boxes and click Confirm to create the rule.
Was this helpful?
How can we improve it?