Qualify agency leads and draft email replies with OpenAI, HubSpot, Gmail and Slack
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, HubSpot, Gmail and Slack. It also calls api.hubapi.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Settings (Edit Fields (Set)): sets 14 fields: agencyName, model, services…
- Validate and normalise lead (Code): runs custom JavaScript code
- Valid submission? (If): checks a condition and branches into true / false
- Find existing HubSpot enquiry (HTTP Request): calls api.hubapi.com (POST)
- Return validation errors (Respond to Webhook): sends the response back to the webhook caller
- Enquiry already exists? (If): checks a condition and branches into true / false
- Alert agency processing failure (Slack): uses Slack
- Return existing deal (Respond to Webhook): sends the response back to the webhook caller
- Website domain approved? (If): checks a condition and branches into true / false
- Return recoverable processing error (Respond to Webhook): sends the response back to the webhook caller
…plus 11 more steps. See the full node list below.
Services it uses
Other OpenAI + Gmail templates (1,623) · Other OpenAI + Slack templates (979) · Other Gmail + Slack templates (957)
HTTP calls to: api.hubapi.com
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - HTTP Request
n8n-nodes-base.httpRequest - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - HubSpot
n8n-nodes-base.hubspot - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow receives agency enquiries via an authenticated webhook, uses OpenAI to extract a structured brief and draft reply (optionally enriching with an approved company homepage), deduplicates by searching HubSpot deals, then creates or…