Hook
Domo groups accumulate duplicates silently — Domo appends (3) to the name and moves on, leaving you with a growing list of near-identical groups that someone has to clean up by hand.
Why It Matters
Without automation, deduplicating groups is a click-by-click slog through the Domo UI — unscalable the moment you have dozens of offenders and completely pointless to repeat manually on a schedule. Automating this with Python and DomoLibrary turns a recurring maintenance burden into a single script that runs every day without you touching it. It's also a clean entry point for teams exploring what Domo Jupyter is actually useful for beyond data science.
What You'll Learn
- Identify duplicate Domo groups programmatically by filtering on naming patterns (e.g., groups ending in
(2),(3)) - Use the
DomoGroupclass from DataCrew's DomoLibrary to callget_all_groupsanddelete - Structure automation logic as discrete, testable chunks rather than monolithic scripts
- Schedule a Domo Jupyter notebook to run on a daily cadence for hands-off governance
Automating Governance with DomoGroup: Patterns That Actually Work
The core pattern here is straightforward: fetch all groups, filter for duplicates by name, delete the offenders. But the interesting part is how Jay structures the thinking — he explicitly breaks the problem into the same steps a human would take in the UI (find, filter, delete one at a time), then replaces each step with a library call.
The DomoGroup class in DomoLibrary exposes get_all_groups() to pull the full group list, and a delete() method to remove a group by ID. Duplicate detection is a filtering problem: groups that share a base name with a sibling that includes a parenthetical suffix (n) are the targets. This keeps the logic readable and auditable — no clever regex magic hiding what the script actually does.
A key decision worth noting: Jay uses Domo Jupyter rather than an external orchestration tool like Make or Zapier. His rationale is practical — teams that are already cautious about third-party software can stay entirely within the Domo ecosystem. The tradeoff is that you're coupling your automation to Domo's notebook infrastructure, but for governance scripts that only touch Domo data anyway, that's a reasonable call.
Scheduling the notebook daily is what elevates this from a one-time fix to an ongoing governance policy. Once the script runs clean, you set it, forget it, and groups stay tidy without any manual intervention.
The broader lesson: Python's value in a Domo environment isn't just data science. Any repetitive admin task — group management, access audits, dataset cleanup — is a candidate for this same pattern.

