Lead collection with SendPulse and GPT-generated welcome emails/SMS
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 and MCP Client.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Workflow Configuration (Edit Fields (Set)): sets 13 fields: sendPulseApiUrl, clientId, clientSecret…
- Generate Hash (Code): runs custom JavaScript code
- Get Token from Storage (Data table): get
- Is Token Expired? (If): checks a condition and branches into true / false
- Get New Access Token (HTTP Request): calls an HTTP API (POST)
- Set Access Token (Edit Fields (Set)): sets 1 field: accessToken
- Save Token to Storage (Data table): create or update
- Get Mailing List (HTTP Request): calls an HTTP API
- Exists email? (If): checks a condition and branches into true / false
- Search Mailing Lists With Emails (Code): runs custom JavaScript code
…plus 11 more steps. See the full node list below.
Services it uses
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 (9)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - HTTP Request
n8n-nodes-base.httpRequest - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Webhook
n8n-nodes-base.webhook
From the author
How it works This n8n template automates lead processing from your website. It receives customer data via a Webhook, stores the customer's contact (email or phone number) in the respective SendPulse address books, and uses the SendPulse MCP Server to send…