How to read Slack data exports

Once you’ve exported your workspace data, you can download a .zip file to access the message history and file links.  


Export options

Workspace owners and admins have two options for exporting data:

  • All Slack subscriptions: export all public channel data with Standard Export
  • Plus subscription: 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 that have been 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, organised 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 can 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 on.

Note: A folder will only be included in the export file if there are messages present for the date range that 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 that the data is a message
  • "user": 
    The ID of the member who sent the message
  • "text": 
    The actual text of the message
  • "ts": 
    The time stamp that shows when the message was posted. You can use any online Unix time converter to translate the time stamp. If you search for ‘Unix time stamp’, you should find a number of options.

Messages will be logged in the date file for the date that the message was sent on. 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 that are 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 that 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 time stamp that shows when the message was edited. You can use any online Unix time converter to translate the time stamp. If you search for ‘Unix time stamp’, you should find a number of options.

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

{
        "type": "message",
        "user": "UTXHL6F8A",
        "upload": false,
        "ts": "1590101612.000000",
        "text": "Hello, this is the message after it has been 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 has been edited."
                            }
                        ]
                    }
                ]
            }
        ]
    }


How to read a deleted message

Members might delete messages that 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 information:

  • "text"
    The text of the deleted message
  • "ts"
    The time stamp that shows when the message was deleted. You can use any online Unix time converter to translate the time stamp. If you search for ‘Unix time stamp’, you should find a number of options.

Message deletion will be logged in the date file for the date that 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 also message subtypes. These are messages that are posted by apps, bots or integrations, or the messages that you see when members join a channel. Here's a full list of message subtypes:

 

Type Description
bot_message A message that has been posted by an app or integration
me_message A /me message has been sent
message_changed A message has been changed
message_deleted A message has been deleted
channel_join A member has joined a channel
channel_leave A member has left a channel
channel_topic A channel topic has been updated
channel_purpose A channel’s purpose has been updated
channel_name A channel has been renamed
channel_archive A channel has been archived
channel_unarchive A channel has been unarchived
group_join A member has joined a group
group_leave A member has left a group
group_topic A group topic has been updated
group_purpose A group’s purpose has been updated
group_name A group has been renamed
group_archive A group has been archived
group_unarchive A group has been unarchived
file_share A file has been shared in a channel
file_reply A reply has been added to a file
file_mention A file has been mentioned in a channel
pinned_item An item has been pinned in a channel
unpinned_item An item has been unpinned from a channel

 

Saved items, pinned items and reactions

Messages can have extra properties that show if anyone has interacted with them.

  • 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 have reacted to a message, but the "count" value will always show the actual number of those who have.


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 that the file was shared in.
  2. Then, locate the JSON file that corresponds to the date that 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 that it was shared in, the file will no longer be accessible via the file link in your export.