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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Slack webhook integration to use the new Slack app instead of legacy custom integration #30074

Open
PieterCK opened this issue May 13, 2024 · 2 comments

Comments

@PieterCK
Copy link
Collaborator

PieterCK commented May 13, 2024

馃搫 Overview

Currently, our Slack integration uses the outdated 'Outgoing WebHooks' custom integration feature to configure the webhook integration.

from Slacks' Outgoing Webhooks page:

Please note, that this is a legacy custom integration - an outdated way for teams to integrate with Slack. These integrations lack newer features and they will be deprecated and possibly removed in the future. We do not recommend their use. Instead, we suggest that you check out their replacement: Slack apps.

The recommended way to set up a webhook integration with Slack is to use Slack Apps Event API.

This PR aims to report which files and features would be impacted if we decided to migrate to the Slack Apps for setting up webhook integrations.

Relevant links:
Migrating from legacy integrations

CZO thread: here

Documentation

Setting up webhook integration through the Events API would require guiding the user through creating the new Slack App and setting up Events API.

current doc:
image

Test Fixtures

Using Events API, we would subscribe to the message.channels event to replicate the current behavior of the legacy Outgoing Webhook. The new payload provides similar data but is in a different format from the current test fixtures.

While the legacy outgoing webhook only worked for public channels, the Events API supports extensive options such as sending messages from DMs, private channels, and also payload from dozens of other event types. Adding support for the newer features from Events API would require adding more test fixtures

current test fixture for a message:

token=aotJImaVOVEVWssawxmegDWt&team_id=T3W8CTX0F&team_domain=gsoc2017&service_id=133126759712&channel_id=C3W8CTZFZ&timestamp=1485947263.000010&user_id=U3W8CTX2T&user_name=slack_user&text=test

the same payload from Events API:

{
    "token": "one-long-verification-token",
    "team_id": "T123ABC456",
    "api_app_id": "A123ABC456",
    "event": {
        "type": "message",
        "channel": "C123ABC456",
        "user": "U123ABC456",
        "text": "Live long and prospect.",
        "ts": "1355517523.000005",
        "event_ts": "1355517523.000005",
        "channel_type": "channel"
    },
    "type": "event_callback",
    "authed_teams": [
        "T123ABC456"
    ],
    "event_id": "Ev123ABC456",
    "event_time": 1355517523
}

@zulipbot
Copy link
Member

Hello @zulip/server-integrations members, this issue was labeled with the "area: integrations" label, so you may want to check it out!

@alya
Copy link
Contributor

alya commented May 14, 2024

Thanks, @PieterCK ! You can use Zulipbot to add labels to issues you file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants