Thu Jan 02

Galaxy Pipe Store Automation

Comprehensive sales order processing automation with email/Telegram integration, PDF parsing, product mapping, and multi-format document generation

Screenshot of Galaxy Pipe Store automation workflow dashboard
~3 MIN

Galaxy Pipe Store’s automation system represents a sophisticated enterprise solution that transforms manual sales order processing into a fully automated workflow. The project demonstrates advanced integration of multiple communication channels, intelligent document processing, and dynamic pricing strategies through a comprehensive FastAPI-based architecture.

Core System Architecture:

The automation platform is built on a robust FastAPI foundation with PostgreSQL database integration, featuring:

  • Backend Framework: FastAPI with async/await patterns for high-performance request handling
  • Database: PostgreSQL with asyncpg connection pooling for scalable data operations
  • Document Processing: Multi-engine PDF parsing using pdfplumber and pytesseract OCR
  • Report Generation: ReportLab integration for professional PDF quotation generation
  • File Processing: Pandas and openpyxl for Excel manipulation and data analysis

Advanced Document Intelligence:

The system features sophisticated PDF parsing capabilities that automatically extract structured data from quotation documents:

  • Multi-pattern recognition for various quotation formats (coded/non-coded items)
  • Flexible address parsing supporting multi-line customer addresses
  • Intelligent price calculation with discount application and currency handling
  • Product code extraction from bracketed notation patterns like [10014]
  • Unit-aware quantity parsing supporting Units, Pc, and length measurements

Multi-Channel Communication Integration:

The project implements three distinct automation workflows through n8n orchestration:

  1. Primary Email Processing (Gmail API integration):

    • Monitors specified sender addresses for new quotations
    • Extracts custom discount percentages from email content using regex patterns
    • Processes PDF attachments and returns Excel + dual PDF formats
    • Implements duplicate prevention through static data tracking
  2. Dadex Format Conversion (Specialized workflow):

    • Converts standard quotations to Dadex company format
    • Custom PDF templating with logo integration
    • Automatic customer data transformation and formatting
  3. Telegram Bot Integration:

    • Real-time PDF processing through Telegram API
    • File download and conversion capabilities
    • Interactive user feedback with processing status updates

The automation system has transformed Galaxy Pipe Store’s operations by:

  • Eliminating manual quotation processing reducing turnaround time from hours to minutes
  • Standardizing product substitutions through intelligent mapping algorithms
  • Ensuring pricing consistency with automated discount calculations
  • Enabling multi-channel accessibility through email and Telegram interfaces

Technical Excellence:

The project showcases modern Python development practices with comprehensive error handling, logging infrastructure, and scalable architecture patterns. The integration of multiple APIs (Gmail, Telegram, PostgreSQL) demonstrates sophisticated orchestration capabilities while maintaining system reliability and user experience.

This enterprise automation solution exemplifies how intelligent document processing and workflow automation can dramatically improve business efficiency while maintaining accuracy and professional presentation standards.

Subscribe to our newsletter!