How to read Slack data exports
Once you’ve exported your workspace data, you can download a ZIP file to access message history and file links.
Export options
Workspace Owners and Admins have two options for exporting data:
- All Slack plans: export all public channel data
- Plus and Enterprise Grid plans: request to export all workspace data
After your export is complete, you'll download a ZIP file with your workspace data. Depending on your export type, here's what your file will include:
| Public data | All workspace data | |
| channels.json |
✓ |
✓ |
| dms.json |
✓ |
|
| groups.json |
✓ |
|
| integration_logs.json |
✓ |
✓ |
| mpims.json |
✓ |
|
| users.json |
✓ |
✓ |
| Folders for every channel |
✓ |
✓ |
Slack messages
When you open your ZIP file, each channel will have its own folder. Each folder will contain messages from the channel, organized by date in separate JSON files.
A typical message
Here's what a very simple message would look like:
{
"type": "message",
"channel": "C2147483705",
"user": "U2147483697",
"text": "Hello world",
"ts": "1355517523.000005"
}
How to read a message
Every message will include the following fields:
-
"type":
Indicates the data is a message -
"channel":
Which channel or direct message the message was shared to -
"user":
The ID of the member who sent the message -
"text":
The actual text of the message -
"ts":
The timestamp the message was posted
Note: Some messages may also include an “attachments” value. This value contains a list of objects attached to the message.
Tip: You can translate the alphanumeric IDs for the "channel" and "user" fields by referencing the channels.json and users.json files.
How to read an edited message
Members might edit messages they've shared to a channel. If your export option allows for edit logs, an edited message will have an "edited" value with the following info:
-
"user"
The ID of the member who made the change -
"ts"
The timestamp the message was edited
Here’s an example:
{
"type": "message",
"user": "U06NKBGN8",
"text": "test:edited",
"edited": {
"user": "U06NKBGN8",
"ts": "1458672560.000000"
},
"ts": "1458672049.000002"
},
{
"type": "message",
"message": {
"type": "message",
"user": "U06NKBGN8",
"text": "test:edited",
"edited": {
"user": "U06NKBGN8",
"ts": "1458672560.000000"
},
"ts": "1458672049.000002"
},
"subtype": "message_changed",
"hidden": true,
"channel": "C0AJZ3BT4",
"ts": "1458672560.000003",
"original": {
"type": "message",
"user": "U06NKBGN8",
"text": "test:original",
"ts": "1458672049.000002"
},
"edited_by": "U06NKBGN8
}
Message subtypes
In addition to messages that members share in Slack, there are message subtypes. These are messages posted by apps, bots, or integrations, or the messages you see when a member joins a channel. Here's a full list of message subtypes:
| Type | Description |
| bot_message | A message was posted by an app or integration |
| me_message | A /me message was sent |
| message_changed | A message was changed |
| message_deleted | A message was deleted |
| channel_join | A member joined a channel |
| channel_leave | A member left a channel |
| channel_topic | A channel topic was updated |
| channel_purpose | A channel purpose was updated |
| channel_name | A channel was renamed |
| channel_archive | A channel was archived |
| Channel_unarchive | A channel was unarchived |
| group_join | A member joined a group |
| group_leave | A member left a group |
| group_topic | A group topic was updated |
| group_purpose | A group purpose was updated |
| group_name | A group was renamed |
| group_archive | A group was archived |
| group_unarchive | A group was unarchived |
| file_share | A file was shared into a channel |
| file_comment | A comment was added to a file |
| file_mention | A file was mentioned in a channel |
| pinned_item | An item was pinned in a channel |
| unpinned_item | An item was unpinned from a channel |
Hidden subtypes
Some message subtypes have hidden properties. This means that a message may be part of a channel's history, but it's not visible to members. Message edit or deletion logs are a good example of hidden subtypes.
Below is a message deletion log. The "hidden": true, value means that this message isn't visible to members:
{
"type": "message",
"subtype": "message_deleted",
"hidden": true,
"channel": "C024BE91L",
"ts": "1358878755.000001",
"deleted_ts": "1358878749.000002",
"event_ts": "1358878755.000002"
}
Stars, pins, and reactions
Messages can have extra properties to show if anyone interacted with it.
- If you see “is_starred”: true, a member has starred the message. If no one has starred the message, you won't see this value.
- If a message has been pinned somewhere, you’ll see the IDs of the locations beside “pinned_to”.
- If “reactions” is present, it will list all reactions that have been added to the message (“name”), the number of members who reacted (“count”), and a list of members who reacted (“users”).
{
"type": "message",
"channel": "C2147483705",
"user": "U2147483697",
"text": "Hello world",
"ts": "1355517523.000005",
"is_starred": true,
"pinned_to": ["C024BE7LT", ...],
"reactions": [
{
"name": "astonished",
"count": 3,
"users": [ "U1", "U2", "U3" ]
},
{
"name": "facepalm",
"count": 1034,
"users": [ "U1", "U2", "U3", "U4", "U5" ]
}
Note: The "reactions" value might not list all the members that reacted to a message, but the "count" value will always show the actual number of those who did.