How to read Slack data exports

After you’ve exported your Slack team’s data, you’ll receive a .zip file containing message history in JSON format, and links to uploaded files.

Depending on which type of export you have access to, the .zip file will include:

  Standard Exports Compliance Exports
channels.json

dms.json  

groups.json  

integration_logs.json

mpims.json  

users.json

Folders for every channel

Note: For more about the different types of exports available, visit Guide to Slack data exports

 

Unzipping the file, you’ll find a folder for each channel containing a separate JSON file for messages based on the day the message was posted. This is what a very simple message would look like:

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

The ID following the `channel` value will tell you what channel, private channel or direct message the message was posted in. The ID following the `user` value lets you know which member sent the message and the `text` value contains the actual message. Lastly, `ts` is the unique (per-channel) timestamp, which tells you when the message was posted. 

Messages can also include an `attachments` value, containing a list of attachment objects.

Tip: To translate the alphanumeric code references for channels and users, you will need to reference the respective channels.json and users.json files that are included in the export.

 

Message edits

If a message was edited after it was posted, it will include an `edited` value, followed by the user ID of the member who edited the message and the timestamp when the edit happened. 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 actual team members post in Slack, there are message subtypes.

Message subtypes include messages that are posted by an integration like Trello, or the messages you see when a member joins or leaves a channel, for example.


Here is 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 team member joined a channel
channel_leave A team 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 team member joined a group
group_leave A team 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 special hidden properties — these include messages that need to be part of the history of a channel, but are not necessarily displayed to other members. Message edit or deletion logs are a good example of hidden subtypes.

 {
   "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 also have several extra properties to show whether anyone has starred, pinned or reacted to the message.

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

⭐️  If `is_starred` is present, and true, a member of your team has starred the message. You won’t see this value if the message hasn’t been starred.

📌  If a message has been pinned somewhere, you will see the IDs of locations where the message has been pinned 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`).

Note: The users in the `reactions` value might not always list all users that have reacted, however `count` will always represent the count of all users who reacted.

Related Articles

Recently Viewed Articles