ad
ad
Topview AI logo

SyncMail AI Email Generator | Syncloop Hackathon Project Demo

People & Blogs


Introduction

Introduction

Welcome to the demonstration of SyncMail, an innovative AI email generator designed to simplify the email creation process. By leveraging user-provided email subjects and keywords, SyncMail utilizes the Google Spam API to generate personalized email bodies. The application includes standard login and sign-up features, making it user-friendly.

Application Overview

Upon launching the application, users can log in to access its features. The backend is powered by SyncLoop, which integrates multiple APIs that enhance the functionality of the email generation process.

User Experience

After logging in, users can view available prompts and their previously generated emails. Currently, several prompts are available in the backend for email creation. For instance, users can generate an announcement email, such as notifying students about an extra lecture.

  1. Email Generation: Users provide the email subject and relevant keywords and then click "generate email." This action sends a request to the SyncLoop backend.
  2. Backend Processing: The SyncLoop backend fetches the prompt body from the database and appends the user's keywords. Once the final prompt is ready, it sends an HTTP request to the Google Spam API to generate the email content.
  3. Database Storage: The generated email is stored in a MySQL database managed by PlanetScale. A "Copy" button allows users to easily copy the generated text.
  4. Dashboard Access: Users can return to the dashboard to review all previously generated emails.

Backend Architecture

Database Connections

The backend uses MySQL for data storage, with the following key SQL queries:

  • Create User: For new user sign-ups.
  • Fetch Emails: To retrieve all emails generated by a user.
  • Prompt Management: APIs to fetch prompts by ID and retrieve all prompts from the database.
  • Login: Validates user credentials and retrieves user details.

Email API

  1. Generate Email API: Accepts user inputs (prompt ID, subjects, and keywords) and constructs a prompt body. It performs operations such as:
    • Fetching the prompt body from the database.
    • Appending keywords.
    • Making an HTTP request to the Google Spam API.
    • Cleaning the generated email from unwanted characters before storing it in the database.
  2. Get Emails API: Returns all generated emails for a given user ID.

Prompts and Cache Implementation

The application includes efficient caching strategies. Prompts are fetched from a Redis database, optimizing read operations and enhancing performance.

  • Get Cache Prompt: Retrieves cached prompts and provides a seamless user experience.

User Operations

The application’s user interface allows the following actions:

  • Create User: New users can sign up, which returns their unique user ID.
  • Login: Existing users can log in by providing their email, with successful validation returning their ID and details.
  • Get Generated Emails: Users can fetch all previously generated emails based on their ID.

Conclusion

In summary, SyncMail combines advanced AI capabilities and a user-friendly interface to automate email generation efficiently. With a solid backend structure and caching mechanisms, it stands as an exemplary project showcased during the SyncLoop hackathon.


Keywords

  • SyncMail
  • AI Email Generator
  • Google Spam API
  • SyncLoop
  • MySQL Database
  • Redis
  • Email Creation
  • Hackathon Project

FAQ

Q1: What is SyncMail?
A1: SyncMail is an AI-driven email generator that helps users create personalized emails based on a subject and keywords.

Q2: How does the email generation process work?
A2: Users input the subject and keywords, and SyncMail sends a request to the Google Spam API to generate the email body, which is then stored in a database.

Q3: What kind of prompts are available in SyncMail?
A3: The application currently includes several prompts for various email types, including announcements and reminders.

Q4: How is user data managed in SyncMail?
A4: User data, including generated emails, is stored in a MySQL database, which is managed by PlanetScale. The application also implements a caching mechanism using Redis for efficiency.

Q5: Is there a limit to how many emails I can generate with SyncMail?
A5: Users can generate multiple emails, and all generated emails can be accessed from their dashboard.

ad

Share

linkedin icon
twitter icon
facebook icon
email icon
ad