How it works
A built-in hook runs as a flow setup hook, before the agent starts. It:- Leases a fresh, single-use address for that run 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.Lease phone number appears in the library as Coming soon and can’t be added yet while we complete carrier (Twilio) approval. Email OTP is fully available today.
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.2. Attach it as a flow setup hook
Open the flow, expand Advanced → Setup Hooks, and add Lease email address. Setup hooks run in order before the flow begins.Email OTP is a flow setup hook — it provisions the inbox for the whole flow. It isn’t offered in teardown or suite 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 (coming soon)
Lease phone number works the same way for phone-based 2FA: it leases a real test phone number for the run and exposesAUTOSANA_PHONE_NUMBER (E.164) and AUTOSANA_PHONE_NUMBER_NATIONAL (without the country code) for the agent to receive an SMS login code. It’s shown in the library as Coming soon until carrier approval is complete.