# Installation

## Install from Google Workspace Marketplace

1. Go to the [MailAgent listing on Google Workspace Marketplace](https://workspace.google.com/marketplace).
2. Click **Install**.
3. Grant the required permissions when prompted.
4. Open Gmail — you'll see the MailAgent icon in the right sidebar.

## First-Time Setup

When you open the addon for the first time:

1. Click the **MailAgent icon** in the Gmail sidebar.
2. You'll be prompted to **authorize** the addon with your Google account.
3. Grant access to:
   * **Gmail** — Read and send emails on your behalf.
   * **Google Sheets** — For report generation.
4. Once authorized, the addon sidebar will load with all configuration options.

## Verify Installation

After installation, you should see:

* The MailAgent icon in the right sidebar of Gmail.
* When clicked, the sidebar shows the AI Agent switch and configuration sections.
* The AI Agent switch should be **off** by default.

## Troubleshooting

### Addon Not Appearing

* Refresh Gmail (`Ctrl+Shift+R` or `Cmd+Shift+R`).
* Check that the addon is enabled in **Settings > Add-ons**.
* Try signing out and back into Gmail.

### Authorization Error

* Ensure you've granted all required permissions.
* If you previously denied permissions, go to [myaccount.google.com/permissions](https://myaccount.google.com/permissions) to manage app access.

### Addon Loads but Shows an Error

* Check your internet connection.
* The MailAgent backend may be temporarily unavailable — wait a moment and retry.
* If the issue persists, contact support.
