⚒️ Build custom workflows automatically with GPT-4o, RAG, and web search

32,701 views · ⚒️ Engineering

💡 Pro Tip — HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it — it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

🚀 What the “Agent Builder” template does

Need to turn a one-line chat request into a fully-wired n8n workflow template—complete with AI agents, RAG, and web-search super-powers—without lifting a finger? That’s exactly what Agent Builder automates:

  1. Listens to any incoming chat message (via the Chat Trigger).
  2. Spins up an AI architect that analyses the request, searches the web, reads n8n docs from a Pinecone vector store, and designs the smallest possible set of nodes.
  3. Auto-generates a ready-to-import JSON template and hands it back as a downloadable file—plus all the supporting assets (embeddings, vector store etc.) so the next prompt is even smarter.

Think of it as your personal “workflow chef”: you shout the order, it shops for ingredients, cooks, plates, and serves the meal. All you do is eat.


🤗 Who will love this?


🧩 How it’s wired

Sub-processWhat happens insideKey nodes
Web Crawler (optional)Firecrawl scrapes docs.n8n.io (or any URL you drop in) and streams raw markdown back.Set URL → HTTP Request (Extract) → Wait & Retry
RAG TrainerSplits the scraped docs, embeds them with OpenAI, and upserts vectors into Pinecone.Recursive Text Splitter → Embeddings OpenAI → Train Pinecone
Agent BuilderThe star of the show – orchestrates GPT-4o (via OpenRouter), SerpAPI web-search, your Pinecone index and a Structured Output Parser to produce → validate → prettify the final n8n template.Chat Trigger → AI Agent → OpenAI (validator) → Code (extract) → Convert to JSON file

Every arrow in the drawn workflow is pre-connected, so the generated template always passes n8n’s import check.


🛠️ Getting set up (5 quick creds)

ServiceCredential type
OpenAI / Azure OpenAI – embeddings & validationOpenAI API
Pinecone – vector storePinecone API
OpenRouter – GPT-4o LLMOpenRouter API Key
SerpAPI – web searchSerpAPI Key
Firecrawl (only if you plan to crawl)Generic Header AuthAuthorization: Bearer YOUR_KEY

Each node already expects those creds; just create them once, select in the dropdown, hit Activate.


🏃‍♀️ What a typical run looks like

  1. User says: “Build me a workflow that monitors our support inbox, summarises new tickets with GPT and posts to Slack.”

  2. Chat Trigger captures the message.

  3. AI Agent:

    • queries Pinecone for relevant n8n docs,
    • fires a SerpAPI search for “n8n gmail trigger example”,
    • sketches an architecture (Gmail Trigger → GPT Model → Slack).
  4. The agent returns JSON ➜ OpenAI node double-checks field names, connections, type versions.

  5. A tiny JS Code node slices the JSON out of the chat blob and saves it as template.json ready for download.

  6. You download, import, and… done.


✏️ Customising


🥡 Take-away notes

🔗 Nodes Used

HTTP Request, AI Agent, Embeddings OpenAI, Recursive Character Text Splitter, SerpApi (Google Search), Pinecone Vector Store

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup