Team Commsvendor:slackEmail OTPUnwrapped Magic LinkCloud KMS TOTP

Automate Slack Confirmation Codes (ABC-123) & Magic Links in Playwright

Automate Slack alphanumeric 6-character codes (A4B-9K2), confirmation magic links, and KMS TOTP for workspace and enterprise grid agents.

Curated Stage 4 Extractor Profile (vendor:slack)

Preserves Slack's alphanumeric 6-character confirmation codes (`A4B-9K2`) while normalizing numeric hyphenated codes (`482-910`), extracts `slack.com/sign_in_with_magic_link` and `/ssb/redirect` URLs, and ignores unread message & weekly summary emails.

Matched Sender Domains
slack.com
Login URL example: https://slack.com/signin
Filtered Non-Auth Noise
  • Unread messages in #channel notifications
  • Weekly workspace summaries & billing statements

1. 60-Second Gmail & Outlook Auto-Forwarding Filter

Don't want to change your existing account email on Slack? Keep your corporate inbox on Slack and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Slack sender header automatically (full setup guide).

# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(slack.com) ("confirmation code" OR "verification code" OR "sign in to Slack" OR "magic link")

# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com

2. Copy-Paste Slack 2FA Automation Snippets

Choose your browser automation stack below. All snippets resolve codes in <200ms with Upstash Redis 15-second lookback protection so arrived-before-wait race conditions never fail a run.

import { test, expect } from '@playwright/test';
import { SentryRelay } from '@sentryrelay/sdk';

const relay = new SentryRelay({ apiKey: process.env.SENTRY_RELAY_API_KEY! });

test('Automate Slack workspace login with alphanumeric code or magic link', async ({ page }) => {
  await page.goto('https://slack.com/signin#/signin');
  await page.fill('input[data-qa="signin_email_input"]', 'slack-bot@in.sentryrelay.com');
  await page.click('button[data-qa="submit_button"]');

  // Slack sends codes like "A4B-9K2" (preserved) or "482-910" (normalized)
  const auth = await relay.wait('slack-bot', {
    channel: 'email',
    sender: 'slack.com',
    timeout: 30,
  });

  if (auth.event?.otpCode) {
    const clean = auth.event.otpCode.replace('-', '');
    await page.fill('input[aria-label*="digit"], input[data-qa="confirmation_code_input"]', clean);
  } else if (auth.event?.magicLink) {
    await page.goto(auth.event.magicLink);
  }

  await expect(page).toHaveURL(/app\.slack\.com/);
});

3. Slack Production Gotchas

Frequently Asked Questions

Does Sentry Relay support Slack alphanumeric codes like A4B-9K2?
Yes. Unlike generic numeric OTP parsers, vendor:slack explicitly matches and preserves 6-character alphanumeric Slack confirmation codes.
What about Slack workspace magic links?
Sentry Relay extracts sign_in_with_magic_link and /ssb/redirect URLs into event.magicLink automatically.
Can Slack unread digest emails cause false OTP matches?
No. Unread messages, weekly workspace summaries, and billing statements are filtered out by the vendor:slack non-auth disqualifier.
Provision an Isolated Identity for Slack

Start free in 3 minutes with 2 isolated @in.sentryrelay.com Identities, 250 monthly email extractions, and Cloud KMS TOTP vaulting.