In this article we will see how we can use Open AI to allow ChatGPT to summarize your email Content.
Many times it happens that you return from a long vacation and you find several long email thread in your mailbox. Instead of reading through each email, we can ask ChatGPT to summarize it and instantly you will have a one-liner sentence summary complete.
I am looping through emails in gmail and passing the email body to ChatGPT to summarize it.
Step 1:- We will use IMAP to get mail messages from Inbox in gmail.
Storing the output in GetMail variable.
Step 2:- Looping through each email and get the email body.
Step 3:- We will pass the EmailBody in the UserInput variable.
Step 4: - Pass the prompt & model paramater value.
Step 5:- Drag the HTTP request activity into the designer Panel.
Click on Configure button and configure the input from Open AI ChatGPT.
You will need an Open Key API which is free and easy to do.
Properties of HTTP Request Activity:-
Store the Output into the variable- ChatGPTOutput.
Step 6:- Deserialize the output by using an activity Deserialize JSON.Store the Output into the variable- DJObject.
This will return an output in the form of JSON Array, now to get the desired result we will using an activity Deserialize JSON Array to decode the JSON Array.
Step 7:- Print the result -
Output- This is the first email in my inbox, lets see how ChatGPT will summarise it.
I hope you enjoyed the article!!
Happy Automation!!