Automatically Add Labels to Google Workspace Emails

Automatically Add Labels to Google Workspace Emails

In this video, I am going to show you how to automatically add labels to your incoming Google Workspace emails using the power of ChatGPT. My name is Andy O’Neill, and I help entrepreneurs automate and integrate AI into their businesses.

I recently came across a Zapier blog post titled ‘How to Automatically Label Emails with ChatGPT and Zapier.’ As a fan of Zapier, I wanted to attempt to build this automation with Make. This automation will watch incoming emails, ask ChatGPT to analyze the email content, and make a decision on which predetermined label to assign to that email.

Please note that this method only works with Google Workspace emails and not with free Gmail or Google Mail email addresses due to security measures. Additionally, you will need an OpenAI account to make this work.

To set up this automation, I have created a template scenario that you can access through the link provided in the video description. Follow the steps in the template to set it up in your Make account.

Let’s walk through each step of the scenario and understand how it works. The first step is the trigger, which watches for new emails in your inbox. I have set it to run every 30 minutes and fetch a maximum of 350 results. The folder we are checking is the inbox.

Next, we have the ChatGPT step. Here, we provide a prompt for ChatGPT to read the email and sort it into predefined categories. You can modify these categories to meet your needs. The email text content is obtained from the previous step, and any links in the email are removed using regular expressions.

After analyzing the email, ChatGPT provides a label value such as ‘sales,’ ‘urgent,’ or ’newsletters.’ In the next step, we use a switch function to map these values to the corresponding label IDs in our Google Workspace account. These labels have been created beforehand.

Finally, we use the ‘Modify Email Labels’ module to assign the appropriate label to the email based on the value received from ChatGPT. The label IDs are obtained by mapping the labels to remove module.

That’s it for the scenario setup. You can now run the scenario and process your emails. In the example shown, ChatGPT correctly labeled a WordPress-related email as ‘WordPress’ and a newsletter email as ‘Newsletters.’

I hope you find this automation helpful in managing and organizing your emails. If you have any comments or questions, please let me know. Thank you for watching, and I’ll see you next time.

The Challenges of Building a Competitive Dragon Ball Legends Team
Older post

The Challenges of Building a Competitive Dragon Ball Legends Team

Newer post

Designing a Rule-Based Chatbot for Golf Ball Recommendations

Designing a Rule-Based Chatbot for Golf Ball Recommendations