Automation proposal · n8n prototype · 2026
Nightly CRM cleanup that knows when to stop
A proposed n8n workflow that finds duplicate contacts in Front every night, merges the safe ones, logs every action to an audit sheet, and posts a summary to Slack. Built to scale to tens of thousands of contacts.
Proposal. A working n8n prototype for a use case I want to implement. It hasn’t run on production data yet, so everything below describes how it’s designed to work.
The problem
Duplicate contacts creep into every support CRM. The same customer writes in from a second channel, or a form creates a new record instead of matching the old one. Agents end up with split conversation histories, and nobody has time to clean it up by hand.
How it works
At 2 AM every night, the workflow pulls contacts from the Front API, normalizes them, and groups likely duplicates into a merge queue. If it finds matches, it merges them through Front’s API, builds an audit row for each merge, and appends it to a Google Sheet. If it finds none, it records that too. Either way, the run ends with a summary posted to Slack so the team knows it happened.

Built to be trusted
Automation that edits customer records has to be conservative, so the guardrails came first:
- Exact matches only. It only auto-merges contacts with the same email address. Name and domain matches or fuzzy matches are deliberately left out, and can be added later behind a Slack approval step.
- A merge cap. No more than 10 merges per run until the matching logic has earned more trust.
- Failures don’t stop the run. If one merge fails, the rest carry on, and the failure is written to the audit log with its status.
- An opt-out. Any VIP or do-not-touch contact tagged
do_not_dedupis skipped automatically.
Built to scale
A support CRM can hold tens of thousands of contacts, and the workflow is designed for that. Front’s API returns contacts a page at a time with a cursor pointing to the next page, so the fetch step loops through every page until the full contact list is in. The same guardrails apply no matter how large the list gets.
The goal is a CRM that gets a little cleaner every night, with a paper trail for every change.