You want to move a Slack channel archive into Notion so you can search, filter, and share the conversation history inside your workspace. Slack does not offer a direct Notion export, but you can build a repeatable pipeline using Slack’s built-in export feature and Notion’s CSV import. This article explains how to export a Slack channel archive, convert the data into a structured CSV file, and import it into a Notion database. You will also learn how to handle date formatting, file attachments, and user mentions so the resulting database is usable immediately.
Key Takeaways: Building a Slack Channel Archive Import Pipeline
- Slack Export > Download > Extract: Request a Slack workspace export, download the ZIP file, and extract the JSON files for your target channel.
- Python or CSV Converter Tool: Use a script or online converter to flatten Slack JSON message data into a CSV with columns for timestamp, user, text, and attachments.
- Notion Database Import > CSV: Create a new Notion database, use the Import CSV option, and map columns to Notion property types such as Date, Title, and Text.
What the Slack Channel Archive Pipeline Does and What You Need Before You Start
The pipeline extracts all messages from a Slack channel, transforms them into a table format, and loads them into a Notion database. After the import, each message becomes a row in Notion. You can then filter by user, date, or keyword, and link the database to other Notion pages.
Before you begin, confirm the following prerequisites:
- You must be a Slack workspace Owner or Admin to request a workspace export. If you are not an admin, ask your workspace owner to run the export for you.
- You need a Notion account with permission to create a new database. Any plan, including Free, supports CSV import.
- You need a computer with a web browser and the ability to unzip a ZIP file. No special software is required for the basic method, but a Python script is recommended for large channels.
- If the channel has more than 10,000 messages, split the export into smaller date ranges to avoid timeouts during import.
Steps to Export the Slack Channel Archive and Import It Into Notion
Method 1: Manual Export and CSV Conversion
This method works for channels with fewer than 5,000 messages. You will use Slack’s built-in export tool and a free online JSON-to-CSV converter.
- Request a Slack workspace export
Go to Slack’s Settings & Permissions page. Under Import/Export, select Export. Choose the date range that covers the channel history you want. Click Start Export. Slack will email you a link to download a ZIP file when the export is ready. This usually takes 5 to 30 minutes depending on workspace size. - Download and extract the ZIP file
Click the link in the email to download the ZIP file. Extract the ZIP to a folder on your computer. Inside you will find a folder named after your workspace, then subfolders for each channel. The channel subfolder contains one or more JSON files named by date, for example 2024-01-15.json. - Open the channel JSON file and copy its content
Open the JSON file for the channel you want to import. Use a text editor like Notepad or Visual Studio Code. Select all the text and copy it. - Convert JSON to CSV using an online converter
Open a free JSON-to-CSV converter such as ConvertCSV or JSON2CSV. Paste the copied JSON into the input field. Set the conversion options: flatten nested objects, use comma as delimiter, and include headers. Click Convert. Download the resulting CSV file. - Clean the CSV file in a spreadsheet editor
Open the CSV file in Microsoft Excel or Google Sheets. Delete columns you do not need such as type, subtype, and bot_id. Rename the remaining columns to match Notion property names: Timestamp, User, Text, Attachments. Convert the timestamp column from Unix epoch format to a readable date. In Excel, use the formula =((A1/1000)+DATE(1970,1,1)) where A1 is the cell with the Unix timestamp. Copy the formula down the column and format the cells as Date. - Create a new Notion database
Open Notion and navigate to the page where you want the database. Click the plus icon and select Database > Table. A new empty database appears. - Import the CSV file into the database
Click the three-dot menu on the top right of the database. Select Import. Choose CSV. Select the cleaned CSV file from your computer. Notion will show a preview of the columns. Map the columns to property types: set Timestamp to Date, User to Text, Text to Title, and Attachments to Text. Click Import. - Verify the imported data
Scroll through the database to confirm all messages appear. Check that dates are correct and that the Title column shows the message text. Edit any rows that show errors in the Date column by re-applying the Date property type.
Method 2: Automated Pipeline Using a Python Script
For channels with thousands of messages, use a Python script to extract messages and generate a CSV. This method is faster and reduces manual errors.
- Install Python and required libraries
Download Python 3.10 or later from python.org. During installation, check Add Python to PATH. Open a terminal or command prompt and run pip install pandas to install the data manipulation library. - Create a Python script to flatten Slack JSON
Create a new file named slack_to_csv.py. Paste the following code into the file:import json import pandas as pd import os channel_folder = 'path/to/your/channel/folder' all_messages = [] for filename in os.listdir(channel_folder): if filename.endswith('.json'): with open(os.path.join(channel_folder, filename), 'r') as f: data = json.load(f) for msg in data: row = { 'Timestamp': pd.to_datetime(msg['ts'], unit='s'), 'User': msg.get('user', ''), 'Text': msg.get('text', ''), 'Attachments': json.dumps(msg.get('attachments', [])) } all_messages.append(row) df = pd.DataFrame(all_messages) df.to_csv('slack_channel_export.csv', index=False) print('CSV file created: slack_channel_export.csv')Replace ‘path/to/your/channel/folder’ with the actual path to the extracted channel folder.
- Run the script
In the terminal, navigate to the folder containing slack_to_csv.py. Run python slack_to_csv.py. The script will create a file named slack_channel_export.csv in the same folder. - Import the CSV into Notion
Follow steps 6 through 8 from Method 1 to create a Notion database and import the CSV file. The Timestamp column will already be in a readable date format, so you can skip the manual conversion step.
If the Import Has Issues After the Main Steps
Date Column Shows Numbers Instead of Dates
Notion sometimes interprets Unix timestamps as plain numbers. To fix this, open the CSV in a spreadsheet editor before importing. Convert the timestamp column to a date format using the formula described in Method 1 step 5. Save the file and re-import. Alternatively, in Notion, change the property type of the Timestamp column to Date and manually re-enter the date for a few rows to force Notion to recognize the pattern.
User Column Is Empty for Some Messages
Slack messages from bots or webhooks may not have a user field. The Python script above handles this by leaving the User cell blank for those messages. After import, you can manually fill in the user name or create a formula property that shows Unknown User where the field is empty. Use the formula: if(empty(prop(“User”)), “Unknown”, prop(“User”)).
Attachments Column Contains Long JSON Strings
The attachments column stores file metadata as JSON text. This makes the database hard to read. To improve readability, delete the attachments column after import and create a separate database for file references. Alternatively, use Notion’s Rollup property to link files from a secondary database. For most use cases, the Text column contains the link to the file if the message included a file upload.
Manual Export vs Python Script vs Third-Party Service Compared
| Item | Manual Export + CSV Converter | Python Script | Third-Party Service |
|---|---|---|---|
| Setup time | 15 minutes | 30 minutes | 5 minutes |
| Cost | Free | Free | Often paid or freemium |
| Message limit | Under 5,000 | No limit | Varies by service |
| Date formatting | Manual conversion needed | Automatic | Automatic |
| User mapping | User IDs only | User IDs only | May map to display names |
| File attachments | Stored as JSON text | Stored as JSON text | May include direct links |
You can now build a repeatable pipeline to move any Slack channel archive into a Notion database. Start with a small channel to test the process, then scale to larger channels. For ongoing imports, schedule the Python script to run weekly and re-import the latest messages. To make the database more useful, add a Select property for channel name if you plan to import multiple channels into the same database.