Build CMS import rows and collision-safe redirects from a legacy CSV upload

Go to Workflow
0 views
Built by Egor Adonev Egor Adonev
Created on August 07, 2026

Description

Quick overview
This workflow uses an n8n Form to upload a legacy content CSV, normalizes source URLs and slugs, generates collision-safe destination slugs, and outputs CMS import rows plus a 301 redirect map with diagnostics for collisions and rejected records.

How it works
Receives a CSV file upload through an n8n Form Trigger.
Extracts the CSV rows and applies configurable migration rules such as redirect status code and slug collision suffix behavior.
Normalizes each record by cleaning the source URL format and trimming titles and supplied slugs.
Generates a destination slug for each record by keeping valid supplied slugs or slugifying titles, then resolves duplicate slugs deterministically with numeric suffixes and rejects rows missing required identity fields.
Builds two output collections: CMS content import rows (title, slug, destination path) and a redirect map (from, to, status code), plus a summary, collision list, and rejected list.
Returns the result flagged as either ready (no collisions or rejects) or review_required (diagnostics present) as the final form response.

Setup
Prepare a CSV export that includes at least sourceUrl and either slug or title for each row.
Update the migration rule defaults (redirectStatusCode, destinationPrefix, and collision suffix policy) to match your CMS and redirect system requirements.
Run the form, upload a representative CSV, and review any collisions and rejected rows before importing the generated contentRows and redirects into your target systems.

This workflow was created by Egor Adonev and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (1)

Code
n8n-nodes-base.code