Automating Employee Offboarding with n8n and Puppeteer: How We Saved Hours Managing Hundreds of Client Sites

Summarize with AI

When an employee leaves your company, it can create more than an emotional gap. It can also leave behind a massive pile of administrative work. If that team member had access to dozens, or even hundreds of client sites, the task of removing them manually can feel overwhelming.

That’s exactly the situation we faced recently at Hueston. In one week, we lost two employees: a developer and an SEO specialist. Overnight, they were still connected to hundreds of WordPress sites we manage for clients. And someone needed to remove their user accounts, reassign posts, and clean things up quickly.

The question was: how do you do that in a way that’s fast, reliable, and secure all without manually logging into every single site?

Why We Turned to n8n

I had never worked with n8n before, but I knew it was a tool built for automation. n8n is an open-source workflow automation platform that allows you to connect tools, APIs, and custom scripts to handle complex business processes.

If there was ever a time to learn, this was it.

The challenge? Removing ex-employees across hundreds of websites required more than just API calls. We needed browser-level automation, the kind that can log in, click buttons, and interact with dashboards the way a human would. That’s where Puppeteer came in.

Building the Workflow

Armed with n8n, Puppeteer, and a healthy dose of curiosity, I opened Cursor (my new favorite development companion) and started building a node app that could be injected into a workflow.

The idea was simple:

  • Launch an automated browser.
  • Log into each client site.
  • Search for the employee’s email.
  • Remove their account.
  • Reassign their posts to the parent admin.

If you’ve ever managed WordPress users, you know how manual this can be (see WordPress roles and capabilities docs).

Sounds straightforward. In reality, it was anything but.

I spent nearly six hours wrestling with the details. Every site’s dashboard behaved slightly differently. Each new page introduced new quirks. Puppeteer would breeze through one step and then get stuck on something small the next.

But step by step, with the help of Cursor and ChatGPT, I worked through the roadblocks. And eventually, it clicked.

The Breakthrough

When the workflow finally ran end-to-end, opening dashboards, deleting accounts, reassigning posts, I sat back and realized just how much time we had saved.

What would have taken hours (or even days) of repetitive manual work now ran automatically. Even better, I was able to add extra touches while the workflow ran: making bulk updates, applying new settings, and future-proofing how we handle mass changes.

This wasn’t just a quick fix. It was a doorway into new flexibility at scale for our agency.

Lessons Learned

Here are a few takeaways from the experience:

  • Automation isn’t just about saving time. It’s about building resilience into your business processes.
  • Breaking problems into steps works. Even when you’re out of your depth, you can move forward one piece at a time.
  • Tools like n8n, Puppeteer, and Cursor unlock new levels of problem-solving. You don’t need to be a full-time developer to build powerful workflows, you just need curiosity and persistence.

Why This Matters for Agencies

If you manage multiple client sites, you know how fragile “manual work” can be. People leave. Credentials change. Clients evolve.

By building automations like this, you’re not just making life easier, you’re making your agency more secure, scalable, and adaptable. That’s the heartbeat of what we do at Hueston, helping teams scale smartly with creative solutions that blend people and technology.

Final Thought:
That week I started out overwhelmed, staring at a problem I didn’t know how to solve. But in the process, I discovered a toolset that now gives us more confidence than ever to handle change at scale.

Sometimes the hardest problems unlock the biggest breakthroughs.

Win on the web with Hueston.

Share
Win on
the web with
Hueston.

Take your business to the next level with a partner who’s as committed to your growth as you are.

Is Your Business Invisible in AI Search Results?

Join our free webinar to learn how you can show up ahead of your competitors, and dominate AI/LLM searches.

Limited Spots