๐ฌ Build CMS import rows and collision-safe redirects from a legacy CSV upload
โก 0 views ยท ๐ฌ Document Extraction & Analysis
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.
๐ Nodes Used
n8n Form Trigger, Extract from File
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File