# 2FA Automation for Emails

Automate account creation workflows with inbox and 2FA support.

AuthenticationForm AutomationBy Browser Use

model: ChatBrowserUse()

### The Idea

Creating accounts online typically requires email verification. This template **automates the entire process** by combining **Browser Use** with **AgentMail** to handle email verification codes automatically.

### Requirements

You'll need **two API keys**:

- **AgentMail** \- For temporary inbox creation  
- **Browser Use** \- For LLM-powered web automation

Get your Browser Use API Key [here](https://cloud.browser-use.com/new-api-key)

Get your AgentMail API Key [here](https://docs.agentmail.to/api-reference/api-keys/create)

### Installation

```bash
uvx browser-use init --template agentmail
```

### How It Works

The template includes two primary functions:

**`get_email_address()`** \- Returns email address of agent inbox

**`get_latest_email()`** \- Checks for unread emails

Using these functions, the agent performs the following workflow:

1. Creates a temporary email inbox  
2. Navigates to registration pages  
3. Fills forms with the temporary email  
4. Retrieves verification codes from incoming emails  
5. Completes email verification
