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 with Standard Export
  • Plus plan: apply to export all workspace data with Corporate Export

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:

  Standard Export Corporate Export
Channels (channels.json)

Direct messages (dms.json)  

Private channels (groups.json)  

App activity logs (integration_logs.json)

Group direct messages (mpims.json)  

Members (users.json)

Folders for every public channel

Folders for every private channel

 

Folders for every direct message

 

Note: A Slack export does not contain any files added to your workspace. There are a series of file links that direct back to the workspace's files.


Navigate your export file

When you open your export .zip file, each channel or direct message will have its own folder. Each folder will contain messages from the conversation, organized by date in separate JSON files.

You'll see reference files for different kinds of conversations: channels.json files for public channels, groups.json files for private channels, and dms.json files for direct messages. These files will contain the user and channel IDs. You’ll need to use both the channel and reference files to find a specific conversation. For example, to find a specific message you might do the following: 

  1. Open the users.json file and search for the users in question. Make note of their IDs. 
  2. Next, open the channels.json, groups.json or dms.json file and search for the conversation that includes those two IDs in the members section. Make note of the channel name or conversation ID for that conversation. 
  3. In the main export folder, find the folder titled with that channel name or conversation ID. You’ll find multiple JSON files in that folder – one for each date that messages were sent.

Note: A folder will only be included in the export file if there are messages present for the date range you’ve exported. For instance, if your retention policy is set to delete messages in public channels after 30 days and you selected a date range over 31 days ago, there would be no folders for public channels included in your export.

How to read a message 

Every message will include the following fields:

  • "type": 
    Indicates the data is a message
  • "user": 
    The ID of the member who sent the message
  • "text": 
    The actual text of the message
  • "ts": 
    The timestamp the message was posted. You can use any online unix time converter to translate the timestamp. If you search for “Unix timestamp” you should find a number of options.

Messages will be logged in the date file for the date the message was sent. Here's what a very simple message would look like:

{
   "type": "message",
   "user": "U2147483697",
   "text": "Hello world",
   "ts": "1355517523.000005"
}

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. You can use any online unix time converter to translate the timestamp. If you search for “Unix timestamp” you should find a number of options.

These edits will be logged in the date file for the date the edit occurred. Here’s an example:

{
        "type": "message",
        "user": "UTXHL6F8A",
        "upload": false,
        "ts": "1590101612.000000",
        "text": "Hello, this is the message after it was edited.",
        "previous": {
            "text": "Hello, this is the original message.",
            "blocks": [
                {
                    "type": "rich_text",
                    "block_id": "Bts",
                    "elements": [
                        {
                            "type": "rich_text_section",
                            "elements": [
                                {
                                    "type": "text",
                                    "text": "Hello, this is the original message."
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "original_ts": "1590101603.000300",
        "subtype": "message_changed",
        "editor_id": "UTXHL6F8A",
        "blocks": [
            {
                "type": "rich_text",
                "block_id": "O+PJ",
                "elements": [
                    {
                        "type": "rich_text_section",
                        "elements": [
                            {
                                "type": "text",
                                "text": "Hello, this is the message after it was edited."
                            }
                        ]
                    }
                ]
            }
        ]
    }


How to read a deleted message

Members might delete messages they've shared to a channel. If your retention policies allow for deletion logs, a deleted message will have a "previous" value and the following info:

  • "text"
    The text of the deleted message
  • "ts"
    The timestamp the message was deleted. You can use any online unix time converter to translate the timestamp. If you search for “Unix timestamp” you should find a number of options.

Message deletion will be logged in the date file for the date the message was deleted. Here’s an example:

{
       "type": "message",
       "user": "UTXHL6F8A",
       "upload": false,
       "ts": "1590101824.000000",
       "text": "",
       "previous": {
           "text": "This is a message that has been deleted.",
           "blocks": [
               {
                   "type": "rich_text",
                   "block_id": "ABSkQ",
                   "elements": [
                       {
                           "type": "rich_text_section",
                           "elements": [
                               {
                                   "type": "text",
                                   "text": "This is a message that has been deleted."
                               }
                           ]
                       }
                   ]
               }
           ]
       },
       "original_ts": "1590101818.000600",
       "subtype": "message_deleted",
       "editor_id": "UTXHL6F8A"
   }


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_reply A reply 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

 

Saved items, pinned items, and reactions

Messages can have extra properties to show if anyone interacted with it.

  • If you see “is_starred”: true, a member has saved the message. If no one has saved 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.


Find Slack file links

Slack export files do not contain any files from the workspace. They include a series of file links, found in your export file’s message history JSON files, that direct back to the workspace's files. Copy these file links from the JSON file and paste them into your browser to open the files.

Here’s how to find a particular file:

  1. Open the folder for the conversation the file was shared in.
  2. Then, locate the JSON file that corresponds to the date the file was shared.
  3. You’ll see the file link in the message details where it was shared, in the “files:” section.

Note: If you delete a file, or the channel or workspace it was shared in, the file will no longer be accessible via the file link in your export.