Introduction
Disclaimer: this is just for fun! I don’t actually use it to suggest replies to my emails 🙂 Additionally I also have disregarded any data sensitivity concerns in doing this for the name of testing things out and fun.
I thought it was a cool concept that could have some valid use cases. For example, maybe suggesting resolutions to help desk requests.
End to end flow
Email comes in to my mailbox asking me for a laptop recommendation. However, I’m super busy so don’t want to do the research so I’ll let ChatGPT do it for me instead. This is where the Azure Logic Apps can take over to automate the rest.
When an email comes in it will trigger my logic app into action, check my new email and get GPT to complete the prompt:
Lastly, a few seconds later, I’m presented with a Teams message suggesting what I should reply with:
Now that is very cool!
How to guide
Lets get into how to actually set this up.
OpenAPI API
- Visit OpenAI API and sign up
- Once within go to the top and select your profile and API Keys
- Select the create new API key and copy the value
Azure Logic App
Next we need to create the logic app.
Microsoft has a good quick-start guide on this here. Once the Logic App is created, go to the resource and select the Logic App designer under Development Tools on the left navigation pane, within the Logic App resource.
Select the trigger – I’m using ‘When a new email arrives’ and authenticated to my M365 mailbox. Then search for the first action which is ‘Html to text’ and include the ‘Body’ dynamic content value.
Next, search for the OpenAI connector and add this to the flow. Type your connection name and type in the API Key we grabbed from the portal earlier. It should be input like ‘Bearer YOUR_API_KEY’ and click create to finish.
Now we can add our prompt that we want ChatGPT to complete for us. I’ve just asked the bot to advise me ‘how I should reply to the following’ and then used the ‘Html to text’ dynamic value to parse it into the prompt for the AI to interpret. I’ve left the other values as default.
Lastly, get the response from the AI to your preferred app. I’m personally using a message to myself in Teams to get the dynamic response from the GPT3 but you get the idea at this point.
Conclusion
This was just a fun test but I think it opens discussion on how this can actually be used to add value to existing processes.
I genuinely think this could be a useful addition to the likes of a help desk to suggest solutions to the engineers, or add notes to incidents so they can review and build on what the AI has already come up with.
Do you have any valid use cases you could use the ChatGPT engine in any of your processes?
Thanks for the insightful article. I’m continuously receiving
Unauthorized error irrespective of mentioning the header in format “Bearer sk-********************th”
Hey, I would double check the API key is correct & still valid. Or try a new one.