A real-time email sentiment analysis application built for the IIT Bombay TechFest Datamatics Hackathon. The solution combines RPA using TruBot for email processing with a modern WPF client and .NET Core backend for sentiment analysis.
- Automated email processing using TruBot RPA
- Real-time email sentiment analysis
- Desktop client with modern WPF interface
- SignalR for real-time updates
- Swagger API documentation
- Email content processing and analysis
- TruBot Designer for automation development
- TruBot Cockpit Personal for bot execution
- Email extraction and processing capabilities
- Seamless integration with backend API
- ASP.NET Core Web API
- SignalR for real-time communication
- Swagger/OpenAPI for API documentation
- HtmlAgilityPack for HTML processing
- Newtonsoft.Json for JSON handling
- WPF (Windows Presentation Foundation)
- SignalR Client for real-time updates
- Modern UI with sidebar design
- Newtonsoft.Json for JSON handling
- .NET 6.0 SDK or later
- Visual Studio 2022 or later (recommended)
- Windows 10/11 for running the WPF client
- TruBot Designer (for RPA development)
- TruBot Cockpit Personal (for bot execution)
- Install TruBot Designer and TruBot Cockpit Personal
- Import the provided bot project:
- Open TruBot Designer
- File > Import Project
- Select the
EmailProcessor
bot project
- Configure email settings:
- Update email server configurations
- Set credentials in secure parameters
- Test the bot:
- Run in TruBot Designer for development
- Deploy to TruBot Cockpit for production
-
Navigate to the backend directory:
cd backend
-
Restore NuGet packages:
dotnet restore
-
Build the project:
dotnet build
-
Run the API:
dotnet run
The API will start at https://localhost:7777
and http://localhost:5000
- Swagger UI will be available at
https://localhost:7777/swagger
-
Navigate to the frontend directory:
cd frontend
-
Restore NuGet packages:
dotnet restore
-
Build the project:
dotnet build
-
Run the WPF application:
dotnet run
TruBot/
├── EmailProcessor/ # Main bot project
├── Objects/ # Reusable automation objects
└── Workflows/ # Email processing workflows
backend/
├── Controllers/ # API endpoints
├── Hubs/ # SignalR hubs for real-time communication
├── Models/ # Data models and DTOs
├── Services/ # Business logic and services
├── Program.cs # Application entry point and configuration
└── *.json # Sample email data files
frontend/
├── App.xaml # Application resources and startup
├── MainWindow.xaml # Main application window UI
└── *.cs # Code-behind files
-
TruBot RPA Process:
- Bot monitors email inbox
- Extracts email content and metadata
- Processes attachments if present
- Sends data to backend API
-
Backend Processing:
- Receives email data from RPA bot
- Performs sentiment analysis
- Broadcasts results via SignalR
- Stores processed data
-
Frontend Display:
- Receives real-time updates
- Displays sentiment analysis results
- Provides interactive dashboard
- Shows historical data
The backend provides several API endpoints through its controllers:
- Swagger UI provides detailed API documentation
- Real-time updates through SignalR hub
- Email processing and sentiment analysis endpoints
- Open TruBot Designer
- Modify email processing workflows
- Test changes in development mode
- Deploy to TruBot Cockpit when ready
- Open
SentimatrixAPI.csproj
in Visual Studio or your preferred IDE - API endpoints are defined in the Controllers directory
- Real-time communication is handled through SignalR hubs
- Services directory contains the business logic
- Open
WpfSidebarApp.csproj
in Visual Studio - UI is defined in XAML files
- Code-behind files contain the UI logic
- SignalR client handles real-time updates
-
RPA Issues:
- Verify TruBot services are running
- Check email server connectivity
- Validate credentials and permissions
- Review bot execution logs
-
Backend Issues:
- Check if ports 7777 or 5000 are available
- Ensure all NuGet packages are restored
- Check Swagger UI for API documentation
-
Frontend Issues:
- Verify backend is running and accessible
- Check SignalR connection status
- Ensure .NET 6.0 runtime is installed
-
Build Issues:
- Clean solution and rebuild
- Delete bin and obj folders
- Restore NuGet packages
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.