2018-12-18 21:07:56 +01:00
|
|
|
# Import from Slack
|
2017-01-31 09:17:05 +01:00
|
|
|
|
2018-04-08 16:11:07 +02:00
|
|
|
Starting with Zulip 1.8, Zulip supports importing data from Slack,
|
|
|
|
including users, channels, messages, attachments, avatars, custom
|
|
|
|
emoji, and emoji reactions.
|
2017-01-31 09:17:05 +01:00
|
|
|
|
2018-12-18 21:07:56 +01:00
|
|
|
This tool has been used to import Slack workspaces with 10,000 members
|
|
|
|
and millions of messages. If you're planning on doing an import much
|
2020-05-05 15:52:32 +02:00
|
|
|
larger than that, or run into performance issues when importing,
|
|
|
|
[contact us](/help/contact-support) for help.
|
2018-12-18 21:07:56 +01:00
|
|
|
|
2018-07-25 04:22:41 +02:00
|
|
|
**Note:** You can only import a Slack workspace as a new Zulip
|
|
|
|
organization. In particular, you cannot use this tool to import from Slack
|
|
|
|
into an existing Zulip organization.
|
|
|
|
|
|
|
|
## Import from Slack
|
|
|
|
|
|
|
|
First, export your data from Slack.
|
2018-04-18 21:27:49 +02:00
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
!!! warn ""
|
|
|
|
**Note:** Only Slack owners and admins can export data from Slack.
|
|
|
|
See Slack's
|
|
|
|
[guide to data exports](https://get.slack.help/hc/en-us/articles/201658943-Export-data-and-message-history)
|
|
|
|
for more information.
|
2019-04-03 00:39:59 +02:00
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
#### Get a Slack API token.
|
|
|
|
|
|
|
|
It will be a long string starting with `xoxb-`. It is required to
|
|
|
|
fetch data that Slack doesn't include in their data exports, like
|
|
|
|
email addresses.
|
2019-04-03 00:39:59 +02:00
|
|
|
|
2020-01-06 20:20:29 +01:00
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
{start_tabs}
|
|
|
|
|
|
|
|
1. [Create a new Slack app](https://api.slack.com/apps).
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
2. [Add OAuth scopes](https://api.slack.com/authentication/basics#scopes)
|
|
|
|
to your app. We need the following 'bot token scopes':
|
|
|
|
- `emoji:read`
|
|
|
|
- `users:read`
|
|
|
|
- `users:read.email`
|
|
|
|
- `team:read`
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
3. [Install the app](https://api.slack.com/authentication/basics#installing)
|
|
|
|
to your workspace. You will get an API token that you can now use to fetch
|
2020-10-23 02:43:28 +02:00
|
|
|
data from your Slack workspace.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2019-04-03 00:39:59 +02:00
|
|
|
{end_tabs}
|
|
|
|
|
2020-05-11 21:11:03 +02:00
|
|
|
### Export your Slack data
|
|
|
|
|
|
|
|
Now, [Export your Slack data](https://my.slack.com/services/export). You will
|
|
|
|
receive a zip file `slack_data.zip`.
|
|
|
|
|
|
|
|
|
|
|
|
This step will also generate a different token starting with
|
|
|
|
`xoxe-`; you don't need it.
|
|
|
|
|
2020-06-09 00:58:42 +02:00
|
|
|
### Import into Zulip Cloud
|
2018-07-25 00:20:19 +02:00
|
|
|
|
2020-05-28 02:00:13 +02:00
|
|
|
Email support@zulip.com with `slack_data.zip`, the Slack API token
|
2018-07-25 04:06:54 +02:00
|
|
|
generated above, and your desired subdomain. Your imported organization will
|
|
|
|
be hosted at `<subdomain>.zulipchat.com`.
|
2018-07-25 00:20:19 +02:00
|
|
|
|
2018-09-15 00:57:06 +02:00
|
|
|
If you've already created a test organization at
|
|
|
|
`<subdomain>.zulipchat.com`, let us know, and we can rename the old
|
|
|
|
organization first.
|
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
### Import into a self-hosted Zulip server
|
2018-04-18 21:27:49 +02:00
|
|
|
|
2018-11-15 01:58:34 +01:00
|
|
|
First
|
|
|
|
[install a new Zulip server](https://zulip.readthedocs.io/en/stable/production/install.html),
|
|
|
|
skipping "Step 3: Create a Zulip organization, and log in" (you'll
|
|
|
|
create your Zulip organization via the data import tool instead).
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
Log in to a shell on your Zulip server as the `zulip` user. To import with
|
|
|
|
the most common configuration, run the following commands, replacing
|
|
|
|
`<token>` with the value generated above.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
|
|
|
```
|
2018-04-19 19:32:58 +02:00
|
|
|
cd /home/zulip/deployments/current
|
2021-04-16 07:46:05 +02:00
|
|
|
./scripts/stop-server
|
2018-04-06 02:21:16 +02:00
|
|
|
./manage.py convert_slack_data slack_data.zip --token <token> --output converted_slack_data
|
2018-10-06 07:15:58 +02:00
|
|
|
./manage.py import '' converted_slack_data
|
2021-04-16 21:02:32 +02:00
|
|
|
./scripts/start-server
|
2018-04-05 01:15:22 +02:00
|
|
|
```
|
|
|
|
|
2020-05-12 22:23:17 +02:00
|
|
|
This could take several minutes to run, depending on how much data
|
|
|
|
you're importing. The server stop/restart is only necessary when
|
|
|
|
importing on a server with minimal RAM, where an OOM kill might
|
|
|
|
otherwise occur.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
**Import options**
|
2018-04-05 01:15:22 +02:00
|
|
|
|
2018-10-06 07:15:58 +02:00
|
|
|
The commands above create an imported organization on the root domain
|
|
|
|
(`EXTERNAL_HOST`) of the Zulip installation. You can also import into a
|
|
|
|
custom subdomain, e.g. if you already have an existing organization on the
|
|
|
|
root domain. Replace the last line above with the following, after replacing
|
|
|
|
`<subdomain>` with the desired subdomain.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
|
|
|
```
|
2018-09-27 23:14:51 +02:00
|
|
|
./manage.py import <subdomain> converted_slack_data
|
2018-04-05 01:15:22 +02:00
|
|
|
```
|
|
|
|
|
2021-05-28 02:47:14 +02:00
|
|
|
### Remove the Slack app used for export
|
|
|
|
|
|
|
|
Once the import is complete, you should delete [the Slack
|
|
|
|
app](https://api.slack.com/apps) (and thus API token) that you created
|
|
|
|
in the earlier step. This will prevent the token from being used to
|
|
|
|
access your Slack instance in the future.
|
|
|
|
|
2018-05-31 16:45:35 +02:00
|
|
|
{!import-login.md!}
|
2018-04-20 19:55:36 +02:00
|
|
|
|
2018-04-05 01:15:22 +02:00
|
|
|
## Caveats
|
|
|
|
|
|
|
|
- Slack doesn't export private channels or direct messages unless you pay
|
|
|
|
for Slack Plus or contact Slack support. See
|
|
|
|
[Slack's documentation](https://get.slack.help/hc/en-us/articles/204897248-Guide-to-Slack-import-and-export-tools)
|
|
|
|
for more details.
|
|
|
|
|
|
|
|
- (Slack Plus import) Message edit history is currently not imported.
|
|
|
|
|
|
|
|
- Slack doesn't export user settings or organization settings, so
|
|
|
|
you'll need to configure these manually.
|
|
|
|
|
2019-10-31 13:18:49 +01:00
|
|
|
- Import of [user roles](/help/roles-and-permissions):
|
2020-06-08 21:01:42 +02:00
|
|
|
- Slack's `Workspace Primary Owner` and `Workspace Owner` users
|
2020-10-23 02:43:28 +02:00
|
|
|
are mapped to Zulip `Organization owner` users.
|
2020-06-08 21:01:42 +02:00
|
|
|
- Slack's `Workspace Admin` users are mapped to Zulip's `Organization
|
2019-10-31 13:18:49 +01:00
|
|
|
administrator` users.
|
|
|
|
- Slack's `Member` users is mapped to Zulip `Member` users.
|
|
|
|
- Slack's `Single Channel Guest` and `Multi Channel Guest` users
|
|
|
|
are mapped to Zulip `Guest` users.
|
|
|
|
- Slack's `Channel creators` have no special permissions in Zulip.
|
2018-04-05 01:15:22 +02:00
|
|
|
|
|
|
|
- The "joined #channel_name" messages are not imported.
|
|
|
|
|
2021-01-06 07:42:08 +01:00
|
|
|
- Messages in threads are still imported, but they are not explicitly marked as
|
|
|
|
to be in a thread.
|
|
|
|
|
2019-10-14 21:40:48 +02:00
|
|
|
[upgrade-zulip-from-git]: https://zulip.readthedocs.io/en/latest/production/upgrade-or-modify.html#upgrading-from-a-git-repository
|
2020-05-09 20:22:11 +02:00
|
|
|
|
|
|
|
## Related articles
|
|
|
|
|
|
|
|
- [Slack-compatible incoming webhook](/integrations/doc/slack_incoming)
|