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 formats

Your export format depends on the type of export you run:

  • Public channels only: Data will be exported in JSON format.
  • All channels and conversations: Data will be exported in JSON format.
  • Single user’s channels and conversations: Data can be exported in either JSON or TXT format.


What your export file contains

JSON files

TXT files

After your export is complete, you'll download a ZIP file with your workspace data and a series of file links that direct back to your workspace's files. Depending on your export type, here's what your ZIP file will include:

  Public channels only All channels and conversations
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

 

*If you export data from an Enterprise Grid org, this folder will be titled org_users.json

Tip: On the Enterprise Grid plan, you can choose to export data for your entire organization or for a specific workspace. Exports for a specific workspace include public and private channels in the selected workspace, but not multi-workspace channels.

If you chose to export data for a single user’s conversations in TXT format, you’ll download a ZIP file with all the messages and files sent by the user you selected once your export is complete. Your ZIP file will contain three folders:

  • channels
  • dms
  • files

Each folder will include a set of TXT files containing the history of a conversation or the files sent by a single user during your selected date range.

Note: If you apply a date range to an export, Slack will return all conversations the user has been part of, even if no messages were sent in that conversation during the dates indicated. In this situation, the channel will not show any messages in the export file.


Navigate your export file

JSON files

TXT files

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.

Each folder in your ZIP file will contain different data from your workspace. The channels folder will include a TXT file of each channel and group direct message a single user has been a part of. The dms folder will include a TXT file of every one-to-one direct message a single user has been a part of.

TXT files for conversations will be named after the channel, or after the usernames of members in the direct message. For example, data for your #general channel will be in general.txt. Data for a direct message might be titled something like mcollins-jjordan.txt.

To view messages from a specific conversation, you might do the following:

  1. Open the channels or dms folder.
  2. Open the TXT file for the channel or direct message you’d like to view.

Once you’ve opened the TXT file, you’ll see the conversation’s message history under the Messages header. Message history will include messages sent by the single user in your export and any other users in the conversation.

Note: Edited and deleted messages will only appear in your export file if your retention policy is set to keep them.


How to read messages 

JSON files

TXT files

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 when the message was posted. You can use any online unix time converter to translate the timestamp.

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.

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 message was sent with the /me slash command
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 emoji 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.

Messages will appear in the order they were sent in the conversation. Messages include the following:

  • The timestamp (in GMT) when the message was sent.
  • The Slack username of the person who sent the message.
  • The contents of the message.

Here’s what a simple message might look like:

[2020-04-20 13:47:27] <jjordan> Welcome to the Sales team channel! Our team is growing faster than ever

Your export file will not differentiate between messages in a thread and messages sent to a channel. All messages in a thread will appear in the flow of the conversation, mixed in with the rest of the messages.

Tip: When someone is mentioned in a message, there won't be an @ symbol before their display name.


How to read an edited message

JSON files

TXT files

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 when the message was edited. You can use any online unix time converter to translate the timestamp.

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."
                            }
                        ]
                    }
                ]
            }
        ]
    }

Edited messages will appear at the end of a conversation’s TXT file under the Message edits header. Edited messages include the following:

  • The timestamp (in GMT) when the message was edited.
  • The username of the person who updated the message.
  • The timestamp when the original message was sent.
  • The contents of the original message, before any edits. The edited message will appear in the Messages section in the flow of the conversation.

Here’s an example:

[2020-04-20 13:47:27] <jjordan> updated [2020-04-20 13:47:09] <jjordan> Welcome to the Sales team channel!


How to read a deleted message

JSON files

TXT files

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 when the message was deleted. You can use any online unix time converter to translate the timestamp.

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"
   }

Deleted messages will appear at the end of a conversation’s TXT file under the Message edits header. Deleted messages include the following:

  • The timestamp (in GMT) when the message was deleted.
  • The username of the person who deleted the message.
  • The timestamp when the original message was sent.
  • The contents of the original message.

Here’s what a deleted message might look like:

[2020-04-20 13:47:47] <jjordan> deleted [2020-04-20 13:47:42] <jjordan> Last week, we did X in sales!


How to view files

JSON files

TXT files

Slack export files in JSON format 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. 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.

The files folder of your ZIP file contains files sent by the single user selected in your export. File titles will appear in your channels and dms TXT files in the flow of a conversation, like this:

[2020-04-20 13:47:27] jjordan shared file(s) F01243S814M

Here’s how to find a particular file:

  1. Open the TXT file for the conversation the file was shared in.
  2. Locate the file you’d like to open in the message history and make note of the corresponding file title (ex. F01243S814M).
  3. Open the files folder and select the file title to open the file.