Developer & AIvendor:vercelEmail OTPUnwrapped Magic Link
Automate Vercel Login Verification & Email OTP in Playwright & Stagehand
Automate Vercel Email Login Verification codes and magic confirmation links in Playwright and Stagehand without deployment alerts getting in the way.
1. 60-Second Gmail & Outlook Auto-Forwarding Filter
Don't want to change your existing account email on Vercel? Keep your corporate inbox on Vercel and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Vercel sender header automatically (full setup guide).
# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(vercel.com) ("verification code" OR "sign in to Vercel" OR "login verification" OR "security code")
# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com2. Copy-Paste Vercel 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 Vercel Email Login Verification', async ({ page }) => {
await page.goto('https://vercel.com/login');
await page.click('button:has-text("Continue with Email")');
await page.fill('input[name="email"]', 'vercel-ops@in.sentryrelay.com');
await page.click('button[type="submit"]');
// Vercel sends a 6-digit security code or /login/verify magic link
const auth = await relay.wait('vercel-ops', {
channel: 'email',
sender: 'vercel.com',
timeout: 30,
});
if (auth.event?.magicLink) {
await page.goto(auth.event.magicLink);
} else if (auth.event?.otpCode) {
await page.fill('input[autocomplete="one-time-code"]', auth.event.otpCode);
}
await expect(page).toHaveURL(/vercel\.com\//);
});3. Vercel Production Gotchas
Vercel Switches Between 6-Digit Codes and Magic Links
Depending on risk signals and flow (signup vs. login), Vercel may send a magic link, a 6-digit code, or both. Checking `auth.event?.magicLink` and `auth.event?.otpCode` handles both branches.
Deployment Failure Alerts Never Trigger False Positives
Accounts connected to active Git repos receive frequent `Deployment failed` emails containing build IDs. The `vendor:vercel` rule disqualifies deployment and invoice alerts automatically.
Arrived-Before-Wait Coverage
Vercel dispatches email verifications immediately on form submit; the 15-second Redis ZSET lookback ensures you never miss it even if Playwright takes 2s to transition screens.