Automating Courier Exchange load alerts via WhatsApp - stuck on 2FA
Hey everyone, looking for some advice on an automation I'm building with Trigger.dev and Playwright. What I'm trying to do: Automatically check Courier Exchange (CE) every morning for available van loads near Luton, filter them by vehicle type and weight, and send the results to a WhatsApp number — so my driver gets a daily alert without anyone having to log in manually. What I've built so far: - A scheduled Trigger.dev task (runs at 8am daily) that launches a headless Chromium browser via Playwright - Logs into CE's web app — it's a Java GWT frontend so standard selectors don't work, had to figure out the right wait strategies and keyboard event approach just to get the form to respond - Navigates to the load search page, parses the results, and sends matching loads as WhatsApp messages via the Meta Cloud API The scraping and WhatsApp parts are working. The login flow itself works too — credentials are correct, the form fills and submits fine. Where I'm stuck: CE requires 2FA on every login. After submitting credentials it shows "Enter the 6-digit verification code from your authenticator app." There's no way around it. What we've tried: Getting to this point was already a journey — CE uses a Java GWT frontend so we had to figure out the right URL to navigate to, the right way to wait for the form to render, and the right way to type into inputs (had to use pressSequentially because GWT's event bus needs actual keydown/keyup events, not just value injection). We took screenshots at each step to debug what was happening. Once we actually got past all of that, we hit the 2FA wall. We tried submitting a live one-time code manually just to see what happens — it works when done by hand, but obviously that's not something you can automate since the code changes every 30 seconds and you'd need to be there to read it. There's no option in the CE account settings to get the underlying secret key or disable 2FA either.