​Do you have a meeting coming up and want a quick refresh on the things you’ve been working on? It might be too much work to go through all your e-mails. Here is a quick and easy way to build a tool that summarizes emails for you, and stores them in whatever format you like. In this article, I will show you how to set up a simple system in Zapier in which e-mails are summarized and stored.
General Idea​
Below is a diagram of what we are doing here in Zapier. Whenever an email comes into your inbox, it will trigger Zapier. There are four steps (for now), contents of the email will be formatted if needed (to remove HTML markdown, for example). That gets sent to GPT-3 with a pre-written prompt, the output will then be stored along with some of the original content and information included in the e-mail.
Set-up in Zapier​
There's a free account available in Zapier. This is for a limited amount of time, but you can give it a shot for free. Setting up should be fairly straightforward, the same goes for a Zap.
You can find a link to a template here: https://zapier.com/shared/defb781e7604d2b0abb3cc75b287fa65a15ff7be
Step 1: Outlook trigger on new incoming email (This can be any other email client supported by Zapier)
Step 2: Formatter for E-mail content.
Step 3: Prompting the Email content
Step 4: Adding it to a database
Now you’ve set up a basic task in Zapier that allows you to do a simple summary as shown in the diagram. It has its limitations, but it does do the job and can build up a useful database.
Optimizing the prompt for better results​
There are a few easy ways to get the result that you want. When fine-tuning the prompt, keep both the input and output in mind. Context and roles improve the output, however, the topic and contents of your emails might cover a wide range of topics. This means that general instructions will do a better job than very specific ones, which might throw the model off.
For practical reasons, it is useful to give instruction, followed by telling GPT-3 when the email follows by simply adding "Email: " and ending with "Summary": ". This avoids GPT-3 answering with "Sure! I can summarize it for you..". Role prompting can come in useful here as well. Asking GPT-3 to act as a personal assistant helps increase the quality of the summary. If you want to summarize work emails, simply adding the role you have gives GPT-3 context to work with. It acts as if it assumes some level of knowledge from the reader, which helps filter out the non-relevant parts. Below I have some examples of emails an office administrator might receive.
You can ask it to summarize a simple email in bullet points, which already does a decent enough job. However, this might not be all that useful depending on how you would like to use it. For quick skimming of email exchanges, you might want them to be short and concise. Simply asking so in the prompt already does a good job. Below is an example of this prompt. Adjust it and play around with it to see how it changes.
The response here is acceptable and would be useful. However, with some further fine-tuning, you can get a better result. As the reader of the summaries you don't care that it's an email, you might want a lower level of detail for the summary. Information about the why is irrelevant, the same goes for the last sentence about questions and concerns. By simply adding that the goal of the summary is for you to skim the contents and that you want pleasantries removed, the result can be improved.
Now you're left with only the most important parts of the summary.
Other use cases​
Now that you've seen the example of summaries, I want to mention a few other examples that you could use this for. One great example is letting GPT-3 categorize your emails. Simply tell it in a prompt to categorize the following email as whatever categories you like, and have it tag those on.
A more in-depth example would be having multiple prompts. You can use a prompt to generate a response that agrees and/or confirms the demands of the email and one that disagrees or denies it. Both can be stored in your concepts and be ready to go whenever you want to send them.
If you regularly receive very similar emails, you can use a filter in Zapier to apply a prompt ONLY to that email. This can be a powerful tool combined with a formatter. You can extract information and export CSV's from then or directly store them in some form of a database.
Concerns​
Please do keep in mind privacy concerns when running emails through GPT-3 and storing them. GPT-3 might also sometimes mess up. Since we aren't fact-checking this is less of a concern. I highly recommend checking back on the original contents whenever unsure.