Skip to main content
Prerequisite: A Momentic-provisioned inbox. Request one.

Fetch and navigate

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);
Then add a Navigate step with URL {{ env.VERIFICATION_LINK }}.