Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
--> I'd like to create a sort of plug-in / add-on for email boxes (Gmail first) that:

  • allows people to sort their non-important emails saved in their inboxes and to delete them very easily
  • automatically delete unecessary emails
  • gamify the whole process with progress bars, icons, etc.

--> Context:

The emails we use all over the world are polluting as much as the whole Australian carbon footprint. We could partially reduce this footprint by deleting the non-useful ones. :)

How would you do that, step by step?

Thanks in advance for your help!

What I have tried:

I'm just starting.

I've read some documentation about building add-ons as well as watched some YT videos.
Posted
Updated 1-Oct-23 8:24am
v3
Comments
Dave Kreskowiak 30-Sep-23 18:36pm    
How is your code supposed to know what's useful and what isn't? Without a very specifically defined criteria how that is determined, you're wasting your time writing a single line of code.

1 solution

Id suggest that you start by creating a trivial add on, and get that working first. Then gradually build up to what you eventually want to produce as it going to be pretty complicated - which means there are a lot of thing you will need to learn before you get it working.

Jumping right into a high-complexity project from a scratch start is like trying to learn to drive in a F1 race - and about as likely to succeed. All you will do is crash and burn, and that is not a good encouragement to continue a dev career. Start small, learn well, build your skill, and move up in terms of complexity.

And do yourself a big favour: don't bother with YT videos. Most of 'em are there for likes and subscribe, and the creatos have no idea how to teach, how to make a video, and in most case how to code either. Money rules in YT: quantity pays, quality takes time - so they don't bother with that bit ...

Start here: Extending Gmail with Google Workspace Add-ons  |  Apps Script  |  Google for Developers[^]
 
Share this answer
 
Comments
Romain Latry 1-Oct-23 15:28pm    
Thanks a lot OriginalGriff, really appreciate it!

Makes sense to build something basic that works first and then improve it? and get fancy.

I've been on the Google article you shared and explored a bit + asked Chat GPT what would be the steps to build that V1 add-on.

He said the following:


**Step 1: Setting Up Your Development Environment**

1. **Create a Google Cloud Project:**
- Go to the [Google Cloud Console](https://console.cloud.google.com/).
- Create a new project.
- Enable the "Google Workspace Add-ons API" for your project.

2. **Install the Required Tools:**
- You'll need a code editor (e.g., Visual Studio Code).
- Install Node.js and npm (Node Package Manager).

I'm there :))

3. **Set Up a Google Workspace Account:**
- You'll need a Google Workspace account to test your add-on. If you don't have one, you can use a personal Gmail account for testing.

**Step 2: Create a Basic Gmail Add-on**

1. **Clone the Gmail Add-on Starter Kit:**
- Google provides a [Gmail Add-on Starter Kit](https://github.com/googlesamples/gmail-addons-starter-kit) that you can use as a starting point. Clone or download it to your local machine.

2. **Set Up OAuth Credentials:**
- Follow the instructions in the Starter Kit's README to set up OAuth credentials. This will allow your add-on to access Gmail.

3. **Run the Starter Kit:**
- Follow the instructions in the README to run the starter kit. This will deploy a basic Gmail add-on that displays a card when you open an email.

**Step 3: Enhance the Add-on Based on Your Goals**

1. **Define Custom Interfaces:**
- Based on your goals of sorting, deleting, and gamifying the email management process, you'll need to create custom interfaces using the Apps Script Card service. These interfaces can include additional information, buttons, and progress bars.

2. **Automate Sorting:**
- Develop logic to sort emails based on criteria you define. For example, categorize emails as "Important" and "Not Important" based on sender, subject, or other factors.

3. **Automatically Delete Emails:**
- Define rules and conditions for what constitutes an unnecessary email. Use the Gmail API to delete these emails. Ensure that you handle this functionality with caution to avoid unintended data loss.

4. **Gamify the Process:**
- Add visual elements such as progress bars, badges, and icons to the user interface of your add-on. These elements can track the user's progress in managing their emails and provide a gamified experience.

**Step 4: Testing and Deployment**

1. **Testing:**
- Test your enhanced add-on extensively to ensure it works as expected. Use a test Gmail account to avoid affecting your real email.

2. **Deployment:**
- When you're satisfied with your add-on, you can deploy it to the Google Workspace Marketplace so others can use it. Follow Google's documentation on how to [publish an add-on](https://developers.google.com/gmail/add-ons/how-tos/publish) for more information.

Remember that creating a Gmail add-on with advanced features like automatic email deletion requires a deep understanding of the Gmail API, OAuth2 authentication, and coding skills. If you're not familiar with coding, you may need to collaborate with a developer or consider learning programming to implement these features effectively and securely. Always handle user data and email deletion with caution to avoid unintended consequences.


Does that make sense for you?

In order to get through all this, are there any code language you would recommend to learn firsthand?

Thanks again for your help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900