GenAiHub

Last checked 24 November 2026 — responded normally.

Qualify inbound WhatsApp leads with Wafly and OpenAI GPT-4o-mini

Quick overview

Live
Open / InstallLast updated November 24, 2026

Description

Quick overview This workflow receives inbound WhatsApp messages via Wafly, uses OpenAI (GPT-4o-mini) with per-phone memory to classify each lead as hot/warm/cold, replies to the sender, and sends hot leads as a handoff message to a configured sales phone number. How it works Receives an inbound WhatsApp message through an n8n webhook configured for Wafly. Filters out non-customer traffic by ignoring echoes (fromMe), group chats, non-ReceivedCallback events, and empty messages. Sends the message text to OpenAI (GPT-4o-mini) with conversation memory keyed by the sender’s phone number to produce a JSON qualification (intent, budget/deadline flags, temperature, and a short reply). Parses the model output defensively and falls back to a safe “warm” classification and neutral reply if the JSON is malformed. Sends the generated reply back to the lead via Wafly WhatsApp messaging. If the lead is marked hot, sends a WhatsApp handoff message to the configured sales phone number with the lead details; otherwise it ends without escalation. Setup Self-host n8n and install the community node package n8n-nodes-wafly (this template does not run on n8n Cloud). Create and select Wafly API credentials and an OpenAI API credential for the OpenAI Chat Model node. Set the target salesPhone number (international format, digits only) in the Config step. Activate the workflow, copy the webhook Production URL, and register it in Wafly (or use the Wafly “Set Webhook” operation if available in your node version). Requirements Self-hosted n8n with the n8n-nodes-wafly community node, a Wafly instance with an inbound webhook, an OpenAI API key, and a WhatsApp number to receive sales handoffs. The workflow does not run on n8n Cloud. Customization Replace the placeholder salesPhone in Config. Edit the qualification prompt, temperature criteria, and reply text for your business. You can send hot-lead handoffs to a CRM instead of a phone. Test with your own number before activating the production webhook. Additional info Step-by-step setup (Portuguese): https://wafly.com.br/solucoes/qualificar-leads-whatsapp-ia-n8n/?utm_source=n8n&utm_medium=workflow_template&utm_campaign=lead_qualification&utm_content=creator_description . This community workflow uses Wafly’s QR-connected WhatsApp API, not Meta’s Official WhatsApp API. Already have an inbound Evolution or Z-API workflow? Compare incoming-text fields before adapting this template: local webhook compatibility kit (Portuguese). It uses fictitious samples and runs locally without credentials or message sending (13 samples, 93 checks). It covers individual text only; media, groups, session migration and this template’s live execution require separate validation. Maintained by Wafly; the Flex connection is paid and non-official, with WhatsApp restriction risks. If the mappings fit, use the guide’s existing trial with a separate test number. An n8n automation workflow template by Iago.

Community Metrics

Views
18
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Iago

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • code
  • ai-agent
  • openai-chat-model
  • simple-memory

Capabilities

  • 4 nodes
  • 18 views

Information

TypeWorkflow
Sourcen8n
AddedOctober 1, 2026

Comments

?

Others in the same category, ranked by how often they are opened.