An Outlook application that reads emails and writes responses based on retrieved context.
You can find here a link to a demo video of the application ! Watch the video
-
Python 3.13 can create python dependencies conflict when using the code in the Indexer folder.
-
Outlook selfsigned https certificate are not accepted by MacOS. You can still deploy the application or use another certificate
To run this application, ensure you have the following prerequisites installed and configured:
- Download and install Node.js (which includes npm) from the official website.
- Verify installation:
node -v npm -v
- Set up a MongoDB Atlas database with a collection to store vectorized documents. Learn more here.
- Each document should follow this structure:
{ "content": "Main text content", "metadata": { "filename": "Filename of the document", "is_image": true, // Boolean indicating if it's an image description "image": "Base64 encoded image or null", "page_number": 1, // Integer indicating the page number "vector_embedding": [1536] // Array of 1536 floating-point numbers } } - The Code used for creating the vectored database can be found in the
Indexerfolder
- Ensure you have an active Outlook account to integrate and test the add-in functionality.
git clone <repository_url>
cd RAG-OUTLOOK-APPLICATION/Outlook-RAG-AppConfigure environment variables by following the template in .env.example.
Create a .env file in both the root folder and the backend folder.
Example .env file:
OPENAI_API_KEY="your_openai_api_key_here"
MONGODB_URL="your_mongodb_url_here"
DATABASE_NAME="your_database_name_here"
COLLECTION_NAME="your_collection_name_here"Ensure your machine's IP address is allowed by the MongoDB database:
- Go to the Security section in MongoDB Atlas.
- Navigate to Network Access.
- Add your IP address.
Navigate to the backend folder and install the required dependencies:
cd backend
npm installInstall developer certificates for HTTPS requests:
npx office-addin-dev-certs installExpected output:
The developer certificates have been generated in /Users/your_username/.office-addin-dev-certs
Installing CA certificate "Developer CA for Microsoft Office Add-ins"...
You now have trusted access to https://localhost.
Certificate: BASE_URL/.office-addin-dev-certs/localhost.crt
Key: BASE_URL/.office-addin-dev-certs/localhost.key
Copy and paste the certificate and key paths into the webpack.config.js file in the app folder:
server: {
type: "https",
options: {
key: fs.readFileSync("BASE_PATH/.office-addin-dev-certs/localhost.key"), // Change BASE_PATH to access the certificate
cert: fs.readFileSync("BASE_PATH/.office-addin-dev-certs/localhost.crt"),
}
}Navigate to the app folder and install the required dependencies:
cd app
npm installIn the app folder, start the application:
npm startNavigate to the backend folder and start the server:
cd backend
node server.jsExpected output:
Server running on port 5551
Connected to MongoDB
- Backend: Runs on port
5551.- Change the port in the
server.jsfile if needed.
- Change the port in the
- Frontend: Runs on port
3000.- Change the port in the
webpack.config.jsfile andmanifest.xmlif needed.
- Change the port in the
A step-by-step guide to install the app is provided in the Resources folder:
- Video:
Resources/Step-by-Step Guide to Install a Custom Add-In App.mp4 - PDF:
Resources/How_To_Install_Outlook_Add-In_App.pdf
Your app is now running locally:
- Backend: http://localhost:5551
- Frontend: http://localhost:3000