All work

Document automation

Customs HS Code Automation Tool

A WhatsApp bot that converts Excel and PDF trade documents into the national customs import format and resolves HS Codes through the national trade API.

XLSX / PDF

Excel / PDF → customs import format

Overview

Trade documents arrive as spreadsheets and PDFs. This tool turns them into the customs import upload format and resolves the correct HS Code through the national single-window trade API. The API token is obtained by a headless browser and refreshed automatically; scanned PDFs are read with Tesseract OCR. What was a manual re-typing exercise is now a WhatsApp conversation that produces an upload-ready file.

Outcome

XLSX + PDF
converted to import format
Tesseract
OCR for scanned PDFs
~1,500
lines of TypeScript in the service

How it works

Document conversion

Excel and PDF trade documents are mapped into the customs import upload format.

HS Code resolution

Codes are resolved through the national trade API instead of being looked up by hand.

Automatic tokens

The API token is acquired by a headless browser and refreshed automatically, so long runs do not expire.

Outcome

01

No more re-typing

Documents are converted by the tool rather than retyped into the customs format.

02

Codes resolved automatically

HS Codes come from the national trade API, cutting the manual look-up step.

03

Refined through a v2 rewrite

A Python FastAPI variant now powers a cleaner second-generation interface.

Want the same for your operation?

Tell me what runs by hand today. I will tell you whether it can be automated.