Templates / Optimize n8n workflow JSON using Azure OpenAI GPT-4o-mini

Optimize n8n workflow JSON using Azure OpenAI GPT-4o-mini

Ready for 3.0

by Rahul Joshi ✓ · 94 views · created 2026-03-02 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 7 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Azure OpenAI Chat Model.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Extract & Validate Workflow Body (Code): runs custom JavaScript code
  2. Optimize Workflow via AI Agent (AI Agent): runs an AI agent, with model: Azure OpenAI Chat Model
  3. Parse, Strip & Validate Optimized JSON (Code): runs custom JavaScript code
  4. Convert Optimized Workflow to File (Convert to File): converts data to a file (to json)
  5. Return Optimized File to Caller (Respond to Webhook): sends the response back to the webhook caller

Services it uses

Azure OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (6)

From the author

📊 Description Automate the optimization of your n8n workflows using AI-powered analysis and restructuring 🤖. This workflow receives any existing n8n JSON via webhook, analyzes it using Azure OpenAI, and returns a fully optimized, import-ready workflow file.…

Excerpt from Rahul Joshi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.