Slack & Discord

Hi, I was wondering if it was possible to disable triggers from replys on Slack for Discord. As of current, I made it so when someone posts a chat in Slack, it would automatically post it to a Discord channel. The problem is when someone reply’s to an old message on Slack, on Discord is would just post it as a new message (someone reading it would have no context on Discord). I just need the original message to pop up on Discord, not the reply’s.

Welcome to the Make community!

First, you need to figure out what is sent when this happens.

So reply to an old message on Slack, and then get the output bundle.

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

2 Likes

Module 1 Slack, New Event Trigger, Output

[
    {
        "user": "U06SRK6NW12",
        "type": "message",
        "ts": "1712247939.254259",
        "client_msg_id": "0315283c-0d88-4b29-b2b6-dcd04ac6b329",
        "text": "No I didn't do the homework that is due for tomorrow",
        "team": "T06SGGC710E",
        "thread_ts": "1712247860.596709",
        "parent_user_id": "U06SRK6NW12",
        "blocks": [
            {
                "type": "rich_text",
                "block_id": "sP5ci",
                "elements": [
                    {
                        "type": "rich_text_section",
                        "elements": [
                            {
                                "type": "text",
                                "text": "No I didn't do the homework that is due for tomorrow"
                            }
                        ]
                    }
                ]
            }
        ],
        "channel": "C06SRKMDASY",
        "event_ts": "1712247939.254259",
        "channel_type": "channel"
    }
]

Module 2 Discord Send Message, Input

[
    {
        "embeds": [
            {
                "image": {},
                "video": {},
                "author": {
                    "name": "Michael Huang",
                    "icon_url": "https://avatars.slack-edge.com/2024-04-03/6907190417810_f3b98bad804643919bbb_32.jpg"
                },
                "footer": {
                    "text": ""
                },
                "provider": {},
                "thumbnail": {},
                "timestamp": "2024-04-04T16:25:40.000Z",
                "description": "No I didn't do the homework that is due for tomorrow"
            }
        ],
        "select": "channel",
        "channelId": "1225285657514217482",
        "message_reference": {}
    }
]

Module 2 Discord Send Message, Output

[
    {
        "id": "1225481425479008457",
        "type": 0,
        "content": "",
        "channel_id": "1225285657514217482",
        "author": {
            "id": "1225193136242819143",
            "username": "Slack Bot",
            "avatar": "e02ec15c7b906d509fba39e4f3e3f584",
            "discriminator": "6116",
            "public_flags": 0,
            "flags": 0,
            "bot": true
        },
        "attachments": [],
        "embeds": [
            {
                "type": "rich",
                "description": "No I didn't do the homework that is due for tomorrow",
                "timestamp": "2024-04-04T16:25:40+00:00",
                "author": {
                    "name": "Michael Huang",
                    "icon_url": "https://avatars.slack-edge.com/2024-04-03/6907190417810_f3b98bad804643919bbb_32.jpg",
                    "proxy_icon_url": "https://images-ext-1.discordapp.net/external/xBiPz1oL6ySvl5wYmXeixpux4PHMOh3wgCrjV5RwrEk/https/avatars.slack-edge.com/2024-04-03/6907190417810_f3b98bad804643919bbb_32.jpg"
                }
            }
        ],
        "mentions": [],
        "mention_roles": [],
        "pinned": false,
        "mention_everyone": false,
        "tts": false,
        "timestamp": "2024-04-04T16:25:40.178Z",
        "flags": 0,
        "components": []
    }
]

So I posted the first message, “This is the first message test. Did anyone do the homework for tomorrow.” I than add a new message “Did anyone want that latest episode of the show.” Next I went back and commented on the first message.
Capture

This is the output messages on Discord. The messages are out of order and it can get confusing for users on Discord.
2

Based on what you have provided, looks like you need to create a filter where thread_ts does not exist

2 Likes