# Outlook Add-in Installation Guide

## 🚀 Quick Setup (5 minutes)

### 1. Prepare the Manifest
Your manifest is ready at: `public/outlook-addon/manifest.xml`

### 2. Sideload for Testing
1. **Open Outlook Web**: https://outlook.office.com
2. **Open any email**
3. **Click "..." menu** → **"Get Add-ins"**
4. **Click "My add-ins"** → **"Custom add-ins"**
5. **"Add a custom add-in"** → **"Add from file..."**
6. **Upload**: `public/outlook-addon/manifest.xml`
7. **Install** and test!

### 3. Test the Add-in
1. **Open an email** in Outlook
2. **Look for "Firmly CRM"** button
3. **Click to open** the add-in panel
4. **Extract email data** and create tasks

## 📋 For Organization-wide Deployment

### Admin Center Method
1. **Go to**: https://admin.microsoft.com
2. **Settings** → **Integrated apps**
3. **Upload custom apps** → **Upload manifest file**
4. **Select users** and deployment options
5. **Deploy**

### Exchange Admin Center
1. **Go to**: https://admin.exchange.microsoft.com
2. **Organization** → **Add-ins**
3. **Add from file** → Upload manifest
4. **Configure** and deploy

## 🔍 Troubleshooting

### Add-in Not Appearing
- Check manifest URLs point to production
- Verify add-in is properly sideloaded
- Try refreshing Outlook

### Can't Create Tasks
- Check API endpoints are accessible
- Verify CORS is configured
- Check user exists in CRM system

### Manifest Errors
- Validate XML syntax
- Check all URLs are accessible
- Ensure proper permissions in manifest

## 📱 Mobile Outlook

The add-in also works in Outlook mobile apps:
1. **Open Outlook mobile app**
2. **Open an email**
3. **Tap "..." menu**
4. **Look for "Firmly CRM"**

## 🔗 URLs to Verify

Before deployment, ensure these URLs work:
- https://firmly.webiton.pt/outlook-addon/index.html
- https://firmly.webiton.pt/api/outlook/tasks/create
- https://firmly.webiton.pt/api/outlook/tasks/user

## 🎯 Next Steps

1. **Sideload and test** the add-in
2. **Create a test task** from an email
3. **Verify** task appears in CRM
4. **Check** Microsoft To-Do sync
5. **Deploy organization-wide** when ready
