Auto Rename n8n Workflow Nodes with AI✨

This workflow uses AI to automatically generate clear and descriptive names for every node in your n8n workflows.
It analyzes each node’s type, parameters, and connections to create meaningful names, making your workflows instantly readable.

Who is it for?

This workflow is for n8n users who manage complex workflows with dozens of nodes. If you’ve ever:

  • Built workflows full of generic names like HTTP Request 2 or Edit Fields 1
  • Struggled to understand your own work after a few weeks
  • Copied workflows from others with unclear node names
  • Spent hours manually renaming nodes one by one

…then this workflow will save you significant time and effort.

Requirements

  • n8n API Credentials: Must be configured to allow listing and updating workflows
  • AI Provider Credentials: An API key for your preferred AI provider (OpenRouter is used currently)

How it works

  1. Trigger: Launch via form select from dropdown or manual trigger (quick testing with pre-selected workflow)
  2. Fetch: Retrieve the target workflow’s JSON and extract nodes and connections
  3. Generate: Send the workflow JSON to the AI, which creates a unique, descriptive name for every node
  4. Validate: Verify the AI mapping covers all original node names
  5. Apply: If valid, update all node names, parameter references, and connections throughout the workflow
  6. Save: Save/Update the workflow with renamed nodes and provide links to both new and previous versions

If validation fails (e.g., AI missed nodes), the workflow stops with an error. You can modify the error handling to retry or loop back to the AI node.

Setup

  1. Connect n8n API credentials

    • Open any n8n node in the workflow and make sure your n8n API credentials is connected
  2. Configure AI provider credentials

    • Open the “OpenRouter” node (or replace with your preferred AI)
    • Add your API credentials
    • Adjust the model if needed (current: openai/gpt-5.1-codex-mini)
  3. Test the workflow

    • Use Manual Trigger for quick testing with a pre-selected workflow
    • Use Form Trigger for a user-friendly interface with workflow selection

Important notice

If you’re renaming a currently opened workflow, you must reload the page after execution to see the latest version, n8n doesn’t automatically refresh the canvas when workflow versions are updated via API.

2 Likes

Edit: checked wrong worflow and this statement is wrong “And be sure to edit your expressions if you used node names to point data.”

Thanks for this workflow!

Future enhancements maybe : (creating notes for each node or workflow as documentation)

1 Like

Thanks @Parintele_Damaskin

That’s already handled automatically with the workflow.
Did you encounter any issues with it?

Yes, I’ve thought of that, but the problem is the spacing and placement of the notes and the overlaps.. Probably an Einstein-level equation :smiley:

1 Like

Expressions are handled :clap: .

Need another coffee.

1 Like

That is a really nice idea, it can be very easy to forget or not bother with naming individual nodes in workflows. This seems like a great tool to save time and help big time with organization and usability when sharing workflows with others.

2 Likes

Broke my workflow by wiping the code in JS. it simply replaced all the code with :

// Loop over input items and add a new field called ‘myNewField’ to the JSON of each one
for (const item of $input.all()) {
item.json.myNewField = 1;
}

return $input.all();

note: used gemini 3 pro

1 Like

Hi @Enver,

Glad you tried the workflow, and thanks for the feedback,

Remember that you can return to any previous version of a workflow using the history feature, as shown here:

Regarding your issue: the workflow logic only work with extracted workflow node names/connections and performs some find-and-replace operations, It shouldn’t wipe anything..

However, since you’re working with code nodes, I can’t be 100% sure, as I haven’t tested it across many cases,
If you’re still facing an issue and need help, I’d appreciate it if you could share a minimal version of your workflow that reproduces the error, and I’d be happy to fix it for you..