归档 Chat 消息
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Google Workspace 管理员可以设置第三方归档服务,以归档 Google Chat 消息和其他内容。聊天归档功能通过将消息记录到 Google 管理控制台中指定的电子邮件地址来运作。本页介绍了这些归档电子邮件的格式。
前提条件
归档类型
以下类型的内容会归档到 Chat 消息中:
以下内容不会归档:
- 不会写入聊天信息流的互动,例如向用户显示卡片以供用户选择操作的 Chat 应用。
- 在 Chat 聊天室中显示但不会写入 Chat 流的 Chat 外部互动,例如在“Google Tasks”标签页中查看任务。
本部分介绍了已归档的聊天信息的格式,并提供了每种类型的示例。
以下是归档消息的标头格式。在这些示例中,归档地址设置为 mike@example.com
。
- 自:
chat-archiving+noreply@google.com
- 主题:私信或聊天室
space ID
中与 users
相关的 Google Chat 活动
- 私信:如果消息是私信或群聊私信。
- 聊天室:如果消息位于 Chat 聊天室中。
- ID:Google Chat 聊天室 ID(由 Google Chat API 使用)。
- With:与消息关联的电子邮件地址。如果电子邮件地址数量少于 5 个,则会列出用户名。如果包含的电子邮件地址超过 5 个,则会列出电子邮件地址的数量。
- “收件人”字段:所有用户的电子邮件地址,以及归档地址。
以下是电子邮件中已归档的聊天活动的示例:
From: <chat-archiving+noreply@google.com>
Date: Tue, Jan 28, 2020 at 10:13 AM
Subject: Google Chat activity from DM 8at_0gAAAAE with rose, mike
To: <rose@example.com>, <mike@example.com>
From: <chat-archiving+noreply@google.com>
Date: Tue, Jan 28, 2020 at 10:15 AM
Subject: Google Chat activity from Chat space g2-uKgAAAAE with 6 members
To: <blanche@example.com>, <mike@example.com>, <tansit@example.com>, <audrey@example.com>, <edward@example.com>, <ritwik@example.com>
此外,Google Workspace 管理员还可以在 Google 管理控制台中启用可选的标头元数据,以添加自定义标头。以下是可选的自定义标头示例:
X-ArchivalProvider-MsgType: Google_Chat
Message-ID: <000000000000ccad6a0598574e66@google.com>
Date: Wed, 27 Nov 2019 17:27:15 +0000
Subject: Chat activity from DM 8at_0gAAAAE
From: chat-archiving+noreply@google.com
To: mike@example.com, edward@example.com
本页面的其余部分提供了各种类型的归档数据示例。
会员状态已更改
当用户加入 Chat 聊天室时:
[2019-09-23T16:47:17.773827Z] mike marsden (mike@example.com) MEMBERSHIP STATE BECAME JOINED
当用户退出 Chat 聊天室时:
[2019-11-27T16:39:05.750194Z] Brian Zhao (brianx@example.com) MEMBERSHIP STATE BECAME NOT A MEMBER
消息已创建
[2019-09-23T17:36:57.710319Z] Edward Deng (edward@example.com) POSTED VEiF-WPTkJU:PezyhNYvFzk Good morning!
消息已修改
[2019-09-23T17:37:08.137734Z] Edward Deng (edward@example.com) EDITED VEiF-WPTkJU:PezyhNYvFzk Very good morning!
消息已删除
[2019-09-23T17:37:14.212127Z] DELETED VEiF-WPTkJU:mn4aIBqVYzs MESSAGE DELETED
消息已置顶
[2019-09-23T17:37:14.212127Z] Edward Deng (edward@example.com) MESSAGE PINNED VEiF-WPTkJU:mn4aIBqVYzs
已取消置顶消息
[2019-09-23T17:37:14.212127Z] Edward Deng (edward@example.com) MESSAGE UNPINNED VEiF-WPTkJU:mn4aIBqVYzs
用户添加或移除了回应
[2019-11-27T18:17:58.479409Z] Donna Lee (donna@example.com) REACTED TO fTi4iKLrveQ:fTi4iKLrveQ =F0=9F=99=82
[2019-11-27T18:18:08.730463Z] Donna Lee (donna@example.com) REMOVED REACTION TO fTi4iKLrveQ:fTi4iKLrveQ =F0=9F=99=82
已添加 Google Meet 链接
[2019-12-13T19:45:54.168271Z] Natraj Verma (natraj@example.com) UPLOADED
Google Meet: https://meet.google.com/vzf-pjqg-czj POSTED 7-NYOcR7gqQ:7-NYOcR7gqQ let's talk over video
已添加文件附件
[2019-12-13T19:50:29.899503Z] Edward Deng (edward@example.com) UPLOADED application/pdf: "kitchen.pdf" POSTED n8dcClo_dWw:gq-ItEhSZvQ wdyt?
如果文件小于文件大小上限,则会将文件附件添加到电子邮件归档中。
已添加指向 Google 云端硬盘文件的链接
[2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) ADDED Google Drive File https://drive.google.com/open?id=11r0l3zuwjgY8k9kw-MWwYq6srSKZTuuLhkr1md2Sl-Y application/vnd.google-apps.presentation: "Test Slides" POSTED _YdFA9wEVVo:_YdFA9wEVVo
聊天面板资源已固定
[2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) RESOURCE PINNED chat board resource ID: fTi4iKLrveQ in chat board: =F0=9F=99=82 with chat board resource: id { group_id { space_id { space_id: "=F0=9F=99=82" } } entity_id: "fTi4iKLrveQ" } entity_type: KEY_RESOURCE payload { key_resource_payload { drive_metadata { id: "1pXqxsZdTZUWNHbcm3YP2FfTi4iKLrveQ" title: "Test doc" external_mimetype: "image/jpeg" } } } sort_order: 0 actor_id { id: "109714730719818745939" } create_time { }
已取消固定 Chat 面板资源
[2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) RESOURCE UNPINNED chat board resource ID: fTi4iKLrveQ in chat board: =F0=9F=99=82
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eGoogle Workspace admins can archive Google Chat messages and content to a designated email address.\u003c/p\u003e\n"],["\u003cp\u003eArchived content includes messages, edits, deletions, reactions, attachments, and Google Meet links.\u003c/p\u003e\n"],["\u003cp\u003eArchived messages are sent as emails from \u003ccode\u003echat-archiving+noreply@google.com\u003c/code\u003e with details like space ID and participants.\u003c/p\u003e\n"],["\u003cp\u003eAdmins can customize email headers with additional metadata for better tracking and organization.\u003c/p\u003e\n"],["\u003cp\u003eCertain interactions, like Chat app card selections and external tasks viewed in spaces, are not archived.\u003c/p\u003e\n"]]],["Google Workspace admins can archive Chat messages by designating an email address in the Admin console. Archived messages, sent from `chat-archiving+noreply@google.com`, include various content types such as message creation, edits, deletions, membership changes, reactions, and added files or links. The message's subject indicates if it's a DM or space and lists participants. Custom headers can also be enabled. Certain interactions, like those not written to the chat stream, are excluded from archiving.\n"],null,["# Archive Chat messages\n\nGoogle Workspace administrators can set up a third-party archiving service to\narchive Google Chat messages and other content. Chat archiving\nworks by logging messages to an email address that's specified in the\nGoogle Admin console. This page describes the format of these archived email\nmessages.\n\nPrerequisites\n-------------\n\n- Prepare a destination email address for archiving.\n- [Specify an email address in the Google Admin console to send archived Chat messages to](https://support.google.com/a/answer/10095268).\n- [Turn Chat history on](https://support.google.com/a/answer/7664184).\n\nArchived types\n--------------\n\nThe following content types are archived in Chat messages:\n\n- [Message header metadata](#message_header_metadata_and_email_format)\n- [Membership state changed](#membership_state_changed)\n- [Message was created](#message_was_created)\n- [Message was edited](#message_was_edited)\n- [Message was deleted](#message_was_deleted)\n- [User reacted or removed a reaction](#user_reacted_or_removed_a_reaction)\n- [Google Meet link was added](#google_meet_link_was_added)\n- [File attachment was added](#file_attachment_was_added)\n- [Link to Google Drive file was added](#link_to_google_drive_file_was_added)\n- Any other activity that writes to the Chat stream, such as a Google Chat app message\n\nThe following content isn't archived:\n\n- Interactions that don't write to the Chat stream, such as Chat apps that display a [card](/workspace/chat/create-messages#create) to users to select an action.\n- Interactions outside of Chat that are displayed in Chat spaces but don't write to the Chat stream, such as viewing a task in the Google Tasks tab.\n\nArchive formats\n---------------\n\nThis section describes the format of archived Chat information\nand gives examples of each type.\n\n### Message header metadata and email format\n\nFollowing is the header format of archive messages. In these examples, the\narchive address is set to `mike@example.com`.\n\n- From: `chat-archiving+noreply@google.com`\n- Subject: Google Chat activity from *DM* or *Space* `space ID` with `users`\n - DM: If the message is a direct message or group direct message.\n - Space: If the message is in a Chat space.\n - ID: Google Chat space ID (used by the [Google Chat API](/workspace/chat/reference/rest)).\n - With: Email addresses associated with the message. If there are fewer than 5 email addresses included, the usernames are listed. If there are more than 5 email addresses included then the count of email addresses are listed.\n- To: email addresses of all users, plus the archive address.\n\nThe following is an example of Chat activity that is archived in\nan email: \n\n From: \u003cchat-archiving+noreply@google.com\u003e\n Date: Tue, Jan 28, 2020 at 10:13 AM\n Subject: Google Chat activity from DM 8at_0gAAAAE with rose, mike\n To: \u003crose@example.com\u003e, \u003cmike@example.com\u003e\n\n From: \u003cchat-archiving+noreply@google.com\u003e\n Date: Tue, Jan 28, 2020 at 10:15 AM\n Subject: Google Chat activity from Chat space g2-uKgAAAAE with 6 members\n To: \u003cblanche@example.com\u003e, \u003cmike@example.com\u003e, \u003ctansit@example.com\u003e, \u003caudrey@example.com\u003e, \u003cedward@example.com\u003e, \u003critwik@example.com\u003e\n\nIn addition, Google Workspace Admins can add custom headers by\n[enabling the optional header metadata](https://support.google.com/a/answer/10095268)\nin the Google Admin console. The following is an example of optional custom\nheaders: \n\n X-ArchivalProvider-MsgType: Google_Chat\n Message-ID: \u003c000000000000ccad6a0598574e66@google.com\u003e\n Date: Wed, 27 Nov 2019 17:27:15 +0000\n Subject: Chat activity from DM 8at_0gAAAAE\n From: chat-archiving+noreply@google.com\n To: mike@example.com, edward@example.com\n\nThe rest of this page gives examples of each type of archived data.\n\n### Membership state changed\n\nWhen a user joins a Chat space: \n\n [2019-09-23T16:47:17.773827Z] mike marsden (mike@example.com) MEMBERSHIP STATE BECAME JOINED\n\nWhen a user leaves a Chat space: \n\n [2019-11-27T16:39:05.750194Z] Brian Zhao (brianx@example.com) MEMBERSHIP STATE BECAME NOT A MEMBER\n\n### Message was created\n\n [2019-09-23T17:36:57.710319Z] Edward Deng (edward@example.com) POSTED VEiF-WPTkJU:PezyhNYvFzk Good morning!\n\n### Message was edited\n\n [2019-09-23T17:37:08.137734Z] Edward Deng (edward@example.com) EDITED VEiF-WPTkJU:PezyhNYvFzk Very good morning!\n\n### Message was deleted\n\n [2019-09-23T17:37:14.212127Z] DELETED VEiF-WPTkJU:mn4aIBqVYzs MESSAGE DELETED\n\n### Message was pinned\n\n [2019-09-23T17:37:14.212127Z] Edward Deng (edward@example.com) MESSAGE PINNED VEiF-WPTkJU:mn4aIBqVYzs\n\n### Message was unpinned\n\n [2019-09-23T17:37:14.212127Z] Edward Deng (edward@example.com) MESSAGE UNPINNED VEiF-WPTkJU:mn4aIBqVYzs\n\n### User reacted or removed a reaction\n\n [2019-11-27T18:17:58.479409Z] Donna Lee (donna@example.com) REACTED TO fTi4iKLrveQ:fTi4iKLrveQ =F0=9F=99=82\n\n [2019-11-27T18:18:08.730463Z] Donna Lee (donna@example.com) REMOVED REACTION TO fTi4iKLrveQ:fTi4iKLrveQ =F0=9F=99=82\n\n### Google Meet link was added\n\n [2019-12-13T19:45:54.168271Z] Natraj Verma (natraj@example.com) UPLOADED\n Google Meet: https://meet.google.com/vzf-pjqg-czj POSTED 7-NYOcR7gqQ:7-NYOcR7gqQ let's talk over video\n\n### File attachment was added\n\n [2019-12-13T19:50:29.899503Z] Edward Deng (edward@example.com) UPLOADED application/pdf: \"kitchen.pdf\" POSTED n8dcClo_dWw:gq-ItEhSZvQ wdyt?\n\nThe file attachment is added to the email archive if the file is smaller than\nthe maximum file size.\n\n### Link to Google Drive file was added\n\n [2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) ADDED Google Drive File https://drive.google.com/open?id=11r0l3zuwjgY8k9kw-MWwYq6srSKZTuuLhkr1md2Sl-Y application/vnd.google-apps.presentation: \"Test Slides\" POSTED _YdFA9wEVVo:_YdFA9wEVVo\n\n### Chat Board Resource Pinned\n\n [2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) RESOURCE PINNED chat board resource ID: fTi4iKLrveQ in chat board: =F0=9F=99=82 with chat board resource: id { group_id { space_id { space_id: \"=F0=9F=99=82\" } } entity_id: \"fTi4iKLrveQ\" } entity_type: KEY_RESOURCE payload { key_resource_payload { drive_metadata { id: \"1pXqxsZdTZUWNHbcm3YP2FfTi4iKLrveQ\" title: \"Test doc\" external_mimetype: \"image/jpeg\" } } } sort_order: 0 actor_id { id: \"109714730719818745939\" } create_time { }\n\n### Chat Board Resource Unpinned\n\n [2020-01-28T17:13:38.332367Z] Edward Deng (edward@example.com) RESOURCE UNPINNED chat board resource ID: fTi4iKLrveQ in chat board: =F0=9F=99=82"]]