Skip to main content

Automate lead qualification & customer support with GPT-4o-mini agents

Workflow preview

Workflow preview
100%
Automate lead qualification & customer support with GPT-4o-mini agents preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Beginner AI Agent Duo: Lead‑Qualifier Task Automator & Ecommerce Chatbot Status: Ready for Use Note: This template is built entirely with official n8n nodes —no community‑node installation requir...

Best for

  • Lead Nurturing automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Robert Breen.

Original n8n.io source

1.1 Workflow description

Title
Automate lead qualification & customer support with GPT-4o-mini agents
Workflow name
Automate lead qualification & customer support with GPT-4o-mini agents

Beginner AI Agent Duo: Lead‑Qualifier Task Automator & Ecommerce Chatbot

Status: Ready for Use ✅
Note: This template is built entirely with official n8n nodes—no community‑node installation required.


📝 Description

This template demonstrates two beginner‑friendly AI‑agent patterns that cover the most common use cases:

Agent Purpose Flow Highlights
Lead‑Qualifier Task Automator Classifies phone‑call transcripts to decide if the caller is a good bulk‑order lead. Manual Trigger → Code (sample data) → AI Agent (GPT‑4o‑mini) → Structured Output Parser → Set (clean fields)
Ecommerce Chatbot Answers customer questions about products, bulk pricing, shipping, and returns. Chat Trigger (webhook) → AI Agent (GPT‑4o‑mini) with Memory → If node → Order‑placed reply or no‑op

Both agents run on GPT‑4o‑mini and use n8n’s LangChain‑powered nodes for quick, low‑code configuration.


⚙️ How to Install & Run

  1. Import the Workflow

    • In n8n, go to Workflows → Import from File or Paste JSON, then save.
  2. Add Your OpenAI API Key

    • Go to Credentials → New → OpenAI API.
    • Paste your key from <https://platform.openai.com>.
    • Select this credential in both OpenAI Chat Model nodes.
  3. (Optional) Select a Different Model

    • Default model is gpt‑4o‑mini.
    • Change to GPT‑4o, GPT‑3.5‑turbo, or any available model in each OpenAI node.
  4. Test the Lead‑Qualifier Agent

    • Click Activate.
    • Press Test workflow.
    • The Code node feeds four sample transcripts; the AI Agent returns JSON like:
      {
        "Name": "Jordan Lee",
        "Is Good Lead": "Yes",
        "Reasoning": "Customer requests 300 custom mugs, indicating a bulk order."
      }
      
  5. Test the Ecommerce Chatbot

    • Copy the Webhook URL from the When chat message received trigger.
    • POST a payload like:
      { "message": "Hi, do you offer discounts if I buy 120 notebooks?" }
      
    • The AI Agent replies with bulk‑pricing info.
    • If the customer confirms an order, it appends *****; the If node then sends “Your order has been placed”.

🧩 Customization Ideas

  • Refine Qualification Logic Edit the Task Agent’s system prompt to match your own lead criteria.
  • Save Leads Automatically Add Google Sheets, Airtable, or a database node after the Set node.
  • Expand the Chatbot Connect inventory APIs, payment gateways, or CRM integrations.
  • Adjust Memory Length Change the Simple Memory node’s window to retain more conversation context.

🤝 Connect with Me

Description

I’m Robert Breen, founder of Ynteractive — a consulting firm that helps businesses automate operations using n8n, AI agents, and custom workflows. I’ve helped clients build everything from intelligent chatbots to complex sales automations, and I’m always excited to collaborate or support new projects.

If you found this workflow helpful or want to talk through an idea, I’d love to hear from you.

Links

🌐 Website: https://www.ynteractive.com
📺 YouTube: @ynteractivetraining
💼 LinkedIn: https://www.linkedin.com/in/robert-breen
📬 Email: [email protected]

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 3 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 5 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Create Sample Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Lead Qualifier Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 12 - Ecommerce Chatbot

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 13 - Test if conversation is complete

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Respond to User

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 15 - End the Conversation

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate lead qualification & customer support with GPT-4o-mini agents
Complexity advanced
Nodes 16
Categories Lead Nurturing, AI Chatbot
Author Robert Breen
Published 29 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6656/6656.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate lead qualification & customer support with GPT-4o-mini agents do?

Beginner AI Agent Duo: Lead‑Qualifier Task Automator & Ecommerce Chatbot Status: Ready for Use Note: This template is built entirely with official n8n nodes —no community‑node installation requir...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, AI Chatbot use case.