Extract a magic login link from an email and navigate to it.
const msg = await email.fetchLatest({ inbox: "link+test", afterDate: new Date(Date.now() - 60_000), timeout: 30_000, }); const [link] = msg.text.match(/https?:\/\/[^\s]+/) ?? []; if (!link) throw new Error("No verification link found in email"); setVariable("VERIFICATION_LINK", link);
{{ env.VERIFICATION_LINK }}
Was this page helpful?