Support CSV or Text format for Slack Import Tool
rusq opened this issue · comments
Awesome tool. I've exported to both json
and txt
and am now trying to reimport conversations into a new slack workspace but getting various errors (like, format not supported for txt
). I know importing via json is not supported. For reference, I am trying to follow these guidelines: https://slack.com/help/articles/360035354694-Move-data-to-Slack-using-a-CSV-or-text-file.
I believe I have to reformat the txt
file to make it importable. Apologies in advance if there's an easy way to do this and I'm missing something simple.
I've spoken with slack support and they recommended reaching out to the slack dump community.
Thanks so much in advance.
Note to myself
Reference: Slack import guide
We can import just about any delimited text file from just about any source, as long as it adheres to the following rules:
- Each row is a new message.
- There are separate columns for: time stamp (Unix time stamp), channel, username, text (in that order).
- Everything is in a single, uncompressed file.
- Messages must be sorted by time stamps (oldest first).
- You’re okay with us escaping any HTML you had, apart from links.
- Multi-line messages can be represented by raw new lines in the file, as long as the text is enclosed in
"
.
As a reference, the file should contain lines that look like this:
"1357559471","random","myles","Anyone want to hear a \"joke\"?"
"1357559472","random","myles","Valid responses are:
Yes, of course
Why bother asking?"
Commenting to keep updated. Thank you @rusq!
Hey @BwL1289, I've implemented a CSV support in the development branch, it's not released yet, but is ready to use, LMK if you want to use it straight away, I'll compile the binary.
You can also check out the cli-remake
branch and run:
git clone https://github.com/rusq/slackdump
git checkout cli-remake
go run ./cmd/slackdump dump -base xxx <channel URL>
go run ./cmd/slackdump convert csv xxx/channels-TXXXXX.json > output.csv
and load the output.csv.
This function should be fine, but the branch is unstable, so expect the unexpected.
Thank you sir! @rusq
Hey @rusq! Receiving the following error when running ./slackdump
command:
zsh: exec format error: ./slackdump
Am I missing something glaringly simple? Apologies in advance!
@BwL1289 may be a wrong executable format, could be a manual build glitch (my fault):
which OS are you running on? Is it Linux or macOS?
Sincere apologies - I absentmindedly forgot to mention I'm on mac, and even more absentmindedly was using the linux executable.
@rusq hope you had a great holiday season. Apologies for the bump, lmk if you were able to create a macOS executable. Thanks so much!
@BwL1289 Hey! Thank you, happy new year to you too!
The macos build is in the comment above, you're looking right at it:
https://github.com/rusq/slackdump/files/10051113/slackdump-darwin.zip
@BwL1289 Hey! Thank you, happy new year to you too!
The macos build is in the comment above, you're looking right at it:
https://github.com/rusq/slackdump/files/10051113/slackdump-darwin.zip
@rusq I am so sorry. Sincerely appreciate it.