Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CSV or Text format for Slack Import Tool #166

Open
rusq opened this issue Oct 28, 2022 · 12 comments
Open

Support CSV or Text format for Slack Import Tool #166

rusq opened this issue Oct 28, 2022 · 12 comments
Labels
enhancement New feature or request
Milestone

Comments

@rusq
Copy link
Owner

rusq commented Oct 28, 2022

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

@rusq
Copy link
Owner Author

rusq commented Oct 28, 2022

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

@rusq rusq added the enhancement New feature or request label Oct 28, 2022
@rusq rusq modified the milestones: v2.2.3, v2.3.1, v2.3.0 Oct 28, 2022
@BwL1289
Copy link

BwL1289 commented Oct 31, 2022

Commenting to keep updated. Thank you @rusq!

@rusq
Copy link
Owner Author

rusq commented Nov 20, 2022

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.

@rusq rusq modified the milestones: v3.0.1, v3.0.0 Nov 20, 2022
@BwL1289
Copy link

BwL1289 commented Nov 20, 2022

Awesome, thank you so much @rusq.

id like to use it straight away, if possible.

thanks again!

@rusq
Copy link
Owner Author

rusq commented Nov 21, 2022

@BwL1289
Copy link

BwL1289 commented Nov 21, 2022

Thank you sir! @rusq

@BwL1289
Copy link

BwL1289 commented Nov 22, 2022

Hey @rusq! Receiving the following error when running ./slackdump command:

zsh: exec format error: ./slackdump

Am I missing something glaringly simple? Apologies in advance!

@rusq
Copy link
Owner Author

rusq commented Nov 23, 2022

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

@BwL1289
Copy link

BwL1289 commented Nov 23, 2022

Sincere apologies - I absentmindedly forgot to mention I'm on mac, and even more absentmindedly was using the linux executable.

@BwL1289
Copy link

BwL1289 commented Jan 10, 2023

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

@rusq
Copy link
Owner Author

rusq commented Jan 10, 2023

@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
Copy link

BwL1289 commented Jan 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants