A Python script that automates the processing of Bills of Entry from India's ICEGATE customs portal, with Google Drive sync for document storage and sharing. Built for a family manufacturing business that handles regular import shipments.
Importing goods into India requires processing Bills of Entry (BOE) through ICEGATE, the Indian Customs electronic gateway. Each shipment generates a BOE document with tariff classifications, duty calculations, and clearance status. For a business doing regular imports, manually downloading, organizing, and sharing these documents is repetitive and error-prone. Documents get lost in email threads, filing is inconsistent, and there's no single source of truth.
- Fetches BOE data from ICEGATE
- Parses the document to extract key fields: BOE number, date, importer details, tariff classifications, duty amounts, clearance status
- Organizes files by date and shipment into a structured folder hierarchy
- Syncs to Google Drive so the documents are accessible to family members and the customs broker without email back-and-forth
- Generates summary reports with duty totals and clearance status across shipments
ICEGATE Portal
|
v
+--------------+
| BOE Fetcher |
| (requests) |
+--------------+
|
v
+--------------+
| Parser & |
| Field Extract|
+--------------+
|
v
+--------------+ +--------------+
| Local File |------>| Google Drive |
| Organization | | Sync |
+--------------+ +--------------+
|
v
+--------------+
| Summary |
| Report Gen |
+--------------+
- Python 3
- requests (ICEGATE interaction)
- Google Drive API (via google-api-python-client)
- PDF parsing for BOE documents
- File system organization and naming conventions
This handles real business financial documents, so the source code (with API credentials, folder paths, and business-specific logic) is not published. This README documents the architecture and purpose. If you're building something similar for Indian customs automation, feel free to reach out.