Mughees Ul Haq

Work 18 / 18

Turning no-code workflows into Python services

Automation jobs for small businesses. For a podcast-booking agency I rebuilt three n8n workflows as ten Python services that can be re-run without sending anything twice. I also built a validation pipeline with capped retries and a content pipeline that skips paid calls it doesn’t need.

For
A podcast-booking agency, a restoration-services client and others
When
2026
My part
Sole developer
Rewrite
3 workflows → 10 services
In five days
Duplicate sends after a restart
none
Every step checks whether it has already run
Retry cap
4 attempts
Then tagged as a permanent failure
Validation pipeline
5 stages
Ingest, extract, validate, enrich, retry

Outreach system

When a new client pays, the system writes a personalised pitch, creates a Notion portal, finds and scores podcasts, sends rate-limited outreach from Gmail and tracks each thread, classifies replies, follows up after 5 to 7 days and sends a wrap-up.

The original was three n8n workflows. I reverse-engineered them and rewrote them as ten Python services in five days. Every step checks whether it has already run, so a crash and a restart do not send a duplicate email.

  1. PaymentA new client signs up
  2. Pitch and portalWritten pitch, Notion page
  3. Find podcastsSearch and score
  4. OutreachRate-limited Gmail, one thread each
  5. RepliesClassified, follow-up after 5 to 7 days
The outreach system as ten services. Each step records that it ran, so a restart picks up where it stopped.

A validation pipeline

Five stages: ingest, extract, validate, enrich, retry. Each item gets at most four attempts and is then tagged as a permanent failure, so one bad record cannot loop forever. Data comes in by three routes depending on the source: intercepted GraphQL responses, intercepted API calls, or parsing the page.

A content pipeline

A 17-node workflow that writes content. Social posts, emails and newsletters skip the paid keyword-research call, because they don’t need it. The keyword filter prefers medium and high competition terms and falls back to low ones, so it never returns an empty list.

What went wrong

I once forced a manual run while the same job was installed as a systemd service with Restart=always. The manual run killed the service’s process, systemd restarted it, and that killed the manual run. The fix is to stop the service before a manual run.

From the run log

au.03The systemd restart loopTwo processes killing each otherFinding

Setup: A forced manual run against a user service with Restart=always

The manual run killed the service’s process on the shared port. systemd restarted it at once, which killed the manual run. The fix was one line: stop the user service first.

au.04Three n8n workflows to ten Python modules0 duplicate sendsShipped

Setup: 3 linked workflows rewritten as 10 modules in 5 days

The rewrite normalised field access across two systems of record and kept completion flags aligned with the original. Stopping duplicate live emails was a real near-miss during the migration.

au.05Validation that can be retried safelyFull audit trailShipped

Setup: 5 stages, attempts capped at 4, permanent-failure tagging

Attempts are capped, updates are idempotent, permanent failures are flagged, and every step is recorded in the system of record. Validators sort each item into valid, invalid, redeemed or unknown. Unknown is a real state and is kept as one.

All 5 runs for this project

Tools

Python, n8n, Playwright, FastAPI, Airtable, Notion, Gmail API, OpenAI.

The full write-up

There is a longer write-up of this project. It has client details in it, so email me if you’d like a redacted copy.