rusq / slackdump

Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Originally posted by @BwL1289 in #165

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:

  1. Each row is a new message.
  2. There are separate columns for: time stamp (Unix time stamp), channel, username, text (in that order).
  3. Everything is in a single, uncompressed file.
  4. Messages must be sorted by time stamps (oldest first).
  5. You’re okay with us escaping any HTML you had, apart from links.
  6. 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.

Awesome, thank you so much @rusq.

id like to use it straight away, if possible.

thanks again!

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!

commented

@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.