Skip to content

Map every workspace member to Slack, not just the person who installed it #324

Closed

Description

@imshashank

Split out of #191 during review of #323.

What happens

#323 creates a Slack user mapping by calling users.lookupByEmail inside completeSlackInstall. That runs once, for one person: whoever clicked Connect, which in practice is the workspace admin.

Every other member of the workspace ends up with no slack_user_mapping row, and nothing else in the product ever calls upsertSlackUserMapping. So the Slack DM feature in #321 works for exactly one person per workspace, and everyone else sees a permanent "Connect your Orbit account to Slack to enable Slack DMs" notice in notification settings with no action attached to it.

The documentation added in #321 currently says "the workspace administrator must complete the Orbit-to-Slack user mapping", which describes a screen that does not exist.

What to build

Two paths, because neither is sufficient alone.

Backfill by email. At install time, and on demand from the integrations settings page, run users.lookupByEmail across the workspace member list and write a mapping for every match. Slack rate limits this endpoint, so it needs to be batched and to tolerate partial completion rather than failing the whole run.

A manual fallback. Email matching has a permanent tail: personal address on Orbit and work address on Slack, aliases, and workspaces where users:read.email is not granted. Those people need a way to link themselves, either a "Connect my Slack account" action in notification settings or an /orbit link slash command. The slash command plumbing already exists in apps/web/src/app/api/webhooks/slack/route.ts.

Also worth handling

  • Unmapping. Someone leaves, or a mapping points at the wrong Slack account, and there is currently no way to remove one.
  • slack_user_mapping has a unique index on (integration_id, slack_user_id), but upsertSlackUserMapping sets its conflict target to (integration_id, user_id) only. Re-mapping a Slack identity to a different Orbit user throws a raw unique violation today. Whatever builds this should fix that and cover it.
  • Showing the mapped Slack display name in notification settings, so a user can tell whether the match is the account they expected.

Not in scope

Routing, the slack_dm channel, and the dispatcher itself. Those are #191 and #321.

Depends on

#323 landing first, since it introduces the table and the lookup client method.

Activity

  1. added
    enhancement
    needs design
    blocked
    p2 medium
    area: integrations
    area: notifications
    size: medium
    points: 3
    on Aug 16, 2026
  2. imshashank commented on Aug 23, 2026

    @imshashank
    ContributorAuthor

    #323 has merged, so the schema and Slack lookup prerequisite named here is no longer blocking this work. I am removing the stale blocked label.

    Keeping needs design for now because the install-time backfill, manual self-link fallback, and notification-settings state overlap with the delivery work in #321 and should be agreed as one user flow before implementation.

  3. removed
    blocked
    on Aug 23, 2026
  4. imshashank commented on Sep 6, 2026

    @imshashank
    ContributorAuthor

    Done by #382. syncSlackMembers backfills a mapping for every workspace member at install time and on demand from the integrations page, and a mapping is removed when the member is removed. The manual self-link for people whose emails do not match is not built; file it as its own small issue if anyone hits it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: integrationsarea: notificationsenhancementneeds designp2 mediumpoints: 3size: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions