How it works
A built-in lease hook executes as a flow setup hook, before the agent starts. You can attach it directly to one flow or add it once to a suite’s setup hooks so every member flow inherits it. It:- Leases an address for that run alone and exposes it to the flow as an environment variable.
- Receives the provider’s email (or SMS) at that address and stores the code.
- Lets the agent read the code back and enter it to complete sign-in.
Built-in hooks
Add these from the Hook Library — on the Hooks page, click Add from Library.Email OTP
1. Add the hook to your organization
On the Hooks page, click Add from Library, then Add on Lease email address. This adds it once for your organization; you can then attach it to any flow or suite.2. Attach it as a setup hook
For one flow, open the flow, expand Advanced → Setup Hooks, and add Lease email address. To use email OTP across a suite, edit the suite and add it under Advanced → Setup Hooks instead. Each member flow receives its own inbox, including when the suite runs members in parallel.Email OTP always executes for one flow run. A suite attachment is an inherited default, not one inbox shared by the suite. If the suite has an auth setup flow, that flow receives its own inbox before its instructions run. The hook isn’t offered in teardown slots.
3. Reference the address in your instructions
Once attached, the hook exposesAUTOSANA_EMAIL_ADDRESS for the run. Reference it in your flow steps like any other variable:
SMS OTP
Lease phone number works the same way for phone-based 2FA. Add it from the Hook Library, then attach it to a flow or suite under Advanced → Setup Hooks. A suite attachment leases a separate number for each member flow, so parallel members never share a number. It isn’t offered in teardown slots. It gives you the number in two forms, because sign-in screens ask for it differently:
Write the steps the way the screen reads:
Test numbers are drawn from a shared pool, so runs that need one can queue behind each other at high concurrency. If a run reports that no number was free, it waited and then gave up — rerun it, or get in touch and we’ll grow the pool.