qmatteoq / outlook-businessmails-openai

49 stars 17 forks source link

Get this puppy running #3

Open moosylog opened 1 year ago

moosylog commented 1 year ago

Can you give a bit more instructions howto get this puppy running? Can not find it in a store and not sure howto add the manifest to my outlook instance.

shahshyam commented 1 year ago

You can compile code locally and run it . You need follow following instruction to upload manifest in outlook web and desktop version. https://docs.servicenow.com/bundle/utah-employee-service-management/page/product/workplace-reservations-outlook-addin/task/upload-manifest-for-single-user.html for desktop client or web. https://docs.servicenow.com/en-US/bundle/utah-employee-service-management/page/product/workplace-reservations-outlook-addin/task/upload-the-manifest-file-office365.html if you need paid version support please contact me. I have almost 10 years of experience in outlook plugin and 2-3 years of experience in this web add-in

qmatteoq commented 1 year ago

I'll add a few more information but keep in mind that I built this as a proof of concept project which is a companion for my series of blog posts dedicated to developers who wants to integrate ChatGPT into their apps. It's not meant to be a "consumer solution" that you take and use it.

Aristocrat-jt commented 1 year ago

I'm assuming it's clone repo, update APIKey, import manifest.xml from web to install plugin, npm install, then npm run.

In my case the Assistant form doesn't allow any test input, and the generate business email button hangs.

qmatteoq commented 1 year ago

@Aristocrat-jt I apologize, I realize that the README was misleading, so I updated it hoping to clarify the purpose of the project. This project is meant to be for developers to learn how to integrate OpenAI in their applications, it isn't meant to be a solution ready to be deployed.

Having said that, the easiest way to run the add-in is to clone the repo, open the project with Visual Studio Code and press F5 to sideload it on Outlook Desktop. If you want to import it from the web without using Visual Studio Code, you must publish it first on a web location (like Azure Storage) or host it on a local server and use a tool like ngrok to get a public URL that you can use in the manifest.

LeroyStaines commented 1 year ago

@qmatteoq for those of us who use visual studio and aren't familiar with typescript applications and VS Code, we need more instructions.

Following the instructions, the first issue I encounter is:

office-addin-debugging' is not recognized as an internal or external command

The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command npm run "start:desktop -- --app outlook"" terminated with exit code: 1.

chaoscreater commented 1 year ago

Terrible instructions. I'm not a developer at all, don't know anything about nodeJS or NPM or whatever, but this is what I've tried so far:

Need to install NPM first. Then, run this in either CMD or Powershell:

npm install office-addin-debugging
npx office-addin-dev-certs install
npm install -g webpack
npm install -g webpack-cli
npm install
npm audit fix

and install the cert when you get the prompt (source - https://github.com/OfficeDev/Office-Addin-Scripts/issues/190).

image

I have no idea where to enter the OpenAPI API key. I checked the codes and don't see anywhere to enter it.

And I'm getting this error:

image

UPDATE:

Got it working. Now just gotta see if I can get this working without using VS Code debugger.

image

chaoscreater commented 1 year ago

I can use Summarize Email, but for the "Generate text" option (as per my screenshot in my previous post), I can't type anything in the text field. I also can't paste anything in there either.

I've also deployed this to a storage account as a static website (by following this guide - https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish-add-in-vs-code) and it has the exact same issue. I can use the textbox in Summarize mail but not the Generate business mail.

image

qmatteoq commented 1 year ago

The focus / typing issue should be fixed by commit 4e2b0be

chaoscreater commented 1 year ago

Nice, got it working now in both the storage account static website and in Outlook addin (which talks to the static website).

One other thing I noticed is that the script requires you to hardcode your OpenAI API key in 3 different places. Maybe should extract this into its own config file and just reference that file.