# Slack: Post chat snapshot to Discourse

**URL:** https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085
**Category:** Feature
**Created:** [October 4, 2016, 5:22pm UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085 "2016-10-04T17:22:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [October 4, 2016, 5:22pm UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/1 "2016-10-04T17:22:51Z")

</div>

Continuation of [GitHub - discourse/discourse-slack-official: DEPRECATED: Official Slack integration for Discourse · GitHub](https://github.com/discourse/discourse-slack-official)

### Summary

Take a snapshot of a discussion in Slack and post it as a topic in Discourse. The output should be a cleanly formatted chat transcript. The average snapshot would be between 5-100 messages long. Also see [“Wisemonk - a Slack bot to move discussions from Slack to Discourse”](https://medium.dgraph.io/wisemonk-a-slackbot-to-move-discussions-from-slack-to-discourse-22a53ddce78f).

_Use Discourse as your “long term memory” for Slack conversations worth remembering._

### Core functionality

1. Type a command like `/topic last:50 category:staff` in Slack.
2. @system (or other designated user) create a new topic in the #staff category. This topic will contain your 50 last Slack messages (in plaintext or minimal Markdown).

### Stretch goals

- Set custom timegap for the snapshot: `from:15:35-16:10` (might be tricky due to timezone differences)
- Ignore messages from selected users in snapshot: `ignore:bob,sara`
- Post as the user who issues the command via Slack
- Open pre-filled topic in browser instead of posting directly
- A graphical interface for posting snapshots. Might be possible to do something using [Slack Buttons](https://api.slack.com/docs/message-buttons).

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [March 2, 2017, 4:11am UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/2 "2017-03-02T04:11:00Z")

</div>

What about a “pull” approach instead of “push”?

Workflow:

1. Copy link to particular slack message
2. Paste it into discourse
3. Onebox has settings for authentication with private slack instances to feature message
4. Onebox appends something like [before:0,after:0] to the end of the link, indicating that it’s going to suck in 0 messages before and after the link (maybe site settings to control those defaults?)
5. User can edit the plaintext to add more messages before and after the post

I think this would be easier to reason about, and allow pasting slack messages as a new topic _or_ inside any post…

I’m calling it “Onebox” above, but maybe its more of a hybrid onebox/plugin thing… not sure the implementation, just using it as a shorthand for the UX.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [March 2, 2017, 4:41am UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/3 "2017-03-02T04:41:09Z")

</div>

Certainly worth considering. @vinothkannans is gonna be working on this, so if our initial plan fails, he can try the “pull approach” instead.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [July 25, 2017, 7:03pm UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/4 "2017-07-25T19:03:28Z")

</div>

> [@mcwumbly](#):
>
> Onebox has settings for authentication with private slack instances to feature message

Just a quick thought on this - it’s quite a security risk to add oneboxing capability to slack messages… The links to messages on slack are essentially

```plaintext
/channel_id/message_timestamp

```

so not exactly hard for someone to guess. Then if they wanted to read your private Slack messages they could make requests to something like

```plaintext
https://meta.discourse.org/onebox?url=myorg.slack.com/archive/channel_id/message

```

Not necessarily a deal-breaker depending on the organisation, but something to bear in mind if someone does implement this “pull approach”. Should be reasonably safe in a `login_required` discourse instance.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [August 21, 2017, 1:27pm UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/5 "2017-08-21T13:27:06Z")

</div>

Completed:

> [@Set up Slack notifications using the discourse-chat-integration plugin](https://meta.discourse.org/t/set-up-slack-notifications-using-the-discourse-chat-integration-plugin/66730):
>
> This #howto describes how to setup the Slack provider included in discourse-chat-integration. It allows posting notifications to Slack, managing rules using Slash Commands, and posting transcripts back to Discourse. Slash command instructions can be found by typing /discourse help. Transcript can be created using the context menus on Slack posts. Install If you haven’t already, install the [discourse-chat-integration](https://meta.discourse.org/t/chatroom-integration-plugin-discourse-chat-integration/66522) plugin, and make sure its enabled via the chat integration enabled site settin…

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [August 21, 2017, 1:27pm UTC](https://meta.discourse.org/t/slack-post-chat-snapshot-to-discourse/51085/6 "2017-08-21T13:27:10Z")

</div>


