Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / AI Agents & Assistants

AI Agents & Assistants

Qualify B2B leads with OpenAI, PostgreSQL, and human email approval

When you run it, it runs an AI agent with OpenAI / ChatGPT using Postgres, SMTP Email.

What it does

## AI B2B Lead Agent with Human Approval ### How it works This workflow receives a B2B lead via webhook, applies business configuration, normalizes and validates the lead, then stores valid records in PostgreSQL. A hybrid AI qualification agent uses OpenAI, PostgreSQL-backed memory, lead history, policy calculations, and database logging tools to produce a structured recommendation. The workflow validates the Agent decision, routes unreliable decisions to manual review, handles no-action outcomes, and creates human approval requests before executing approved follow-up emails or lead conversions. ### Setup steps - Configure PostgreSQL credentials and run the manual setup path before processing leads. - Configure OpenAI credentials for the chat model. - Configure SMTP credentials for review, approval, and approved follow-up nodes. - Edit business settings in Workflow Configuration. - Secure the production webhook before accepting public submissions. ### Customization Adjust validation, scoring thresholds, Agent instructions, approval criteria, and email templates to match your sales process.

The steps

  1. Run Database Setup Once
  2. Create Agent Tables
  3. Setup Complete
  4. Receive Lead
  5. Workflow Configuration
  6. Normalize Lead
  7. Validate Lead
  8. Valid Lead?
  9. Return Invalid Lead
  10. Upsert Lead
  11. Hybrid Lead Qualification Agent
  12. OpenAI Chat Model
  13. Postgres Lead Memory
  14. Structured Lead Decision

42 steps in total.

Similar automations