USPS Postal Statement Automation · Integration & Automation
The Post Pros
The Post Pros is a direct mail and marketing company in the United States. It designs, prints and mails postcard, letter and brochure campaigns for local businesses, so a steady stream of commercial mail jobs goes to the USPS. We automated the most tedious part of that process: fetching each job's postal statement from the USPS Business Customer Gateway, naming it correctly and filing it in Google Drive, with a second automation to cancel a job on request.

Built with
- Python
- Selenium
- Headless Chrome
- Webhooks
- Zapier
- Google Drive API
- Google Cloud
Expertise
- Browser automation
- Event-driven workflows
- Webhook APIs
- Secure handling of production accounts
- Cloud deployment
- Documentation and handover
Verticals
- Direct mail marketing
- Print and mail services
- Marketing agencies
Every campaign The Post Pros mails is submitted to the USPS as a job, and every job produces a postal statement, and the team needs that PDF on file. Getting it meant logging in to the USPS Business Customer Gateway, working through several screens to reach each job, downloading the statement and renaming it by hand. The portal often timed out mid-download, and the team's workaround was to start again in a private browser window.
Accuracy was not negotiable. Each file had to be named in the format JOBID - PS########, and the job ID and postal statement ID had to match exactly, because a mismatch has real consequences with the USPS. The automation also had to work inside a live production account without touching any job it was not asked to.
There was a timing problem too. Jobs are uploaded by the USPS Mail.dat client and can take anywhere from a minute to half an hour to appear on the dashboard, so a simple scheduled scraper would either miss new jobs or hammer the portal every minute.
We proposed an event-driven design instead of a scraper on a timer. When a job is uploaded, The Post Pros' CRM sends a webhook through Zapier with the job ID. The automation waits for the job to appear, searches for it by ID, and checks again later if the USPS has not published it yet. The portal is only visited when there is something to fetch, and the job ID travels with the request from start to finish, which is what keeps every statement matched to the right job.
The automation drives a real browser with Python and Selenium, running headless on a server. Each run starts a fresh session and signs out of the gateway when it finishes, which removed the time-out problem the team had been working around by hand. Every step waits for the page element it needs, up to 30 seconds, so a slow dashboard delays a run instead of breaking it. Statements are downloaded, renamed to the agreed format and uploaded to the right Google Drive folder automatically.
Partway through, the client asked for a second capability: cancelling a job from the same system. We added a separate cancel webhook that follows the same steps and then cancels and confirms, and kept it strictly separate from retrieval so no job can be cancelled by accident. It was tested on a dedicated test job the client created before it went anywhere near real work.
Both webhooks run on a Google Cloud server in The Post Pros' own account. The code is in their GitHub organisation with a README their team can follow, and we walked their developer through the setup on a call. The working webhooks were ready the day after we started, and the full system was deployed within a week.
Postal statements now arrive in Google Drive on their own, correctly named and matched to their job, without anyone logging in to the USPS portal. A job can be cancelled with a single webhook from the same CRM workflow.
The Post Pros own the whole system: the server, the code and the documentation. We stayed on the engagement through December 2024 while the team put the automation into everyday use and fine-tuned it with them.
In the client's own words, it was a robust solution that worked really well for them, designed with the long term in mind.
Client feedback
What the client said
Working with Vipin was the best experience I’ve had working with a developer on Upwork. He was really responsive, easy to work with, and designed a robust solution that worked really well for us - with the long term in mind. He was very thorough and did not cut any corners. I will definitely be doing work with him in the future, I highly recommend!
Talk to an engineer
Like what you see?
Tell us about the system you need. We reply with questions and a suggested first step.




