Skip to main content

Lead collection with SendPulse and GPT-generated welcome emails/SMS

Workflow preview

Workflow preview
100%
Lead collection with SendPulse and GPT-generated welcome emails/SMS preview
Open on n8n.io

Important notice

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

1. Workflow Overview

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 [ SendPu...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.httprequest, n8n-nodes-base.datatable, n8n-nodes-base.code, n8n-nodes-base.set, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.mcpclienttool, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Lead collection with SendPulse and GPT-generated welcome emails/SMS
Workflow name
Lead collection with SendPulse and GPT-generated welcome emails/SMS

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 personalized welcome messages (email or SMS) generated using AI.

The template also includes built-in SendPulse token management logic with caching in the Data Table, which reduces the number of unnecessary API requests.

SendPulse’s MCP server is a tool that helps you manage your account through a chat with an AI assistant. It uses SendPulse API methods to get information and perform actions, such as request statistics, run message campaigns, or update user data.

MCP server acts as middleware between your AI assistant and your SendPulse account. It processes requests through the SendPulse API and sends results back to chat, so you can manage everything without leaving the conversation.

Once connected, the MCP server operates as follows:

  1. You ask your AI assistant something in chat.
  2. It forwards your request to the MCP server.
  3. The MCP server calls the API to get data or perform an action.
  4. The AI assistant sends the result back to your chat.

Set up

Requirements:

  • An active SendPulse account.
  • Client ID and Client Secret from your SendPulse account.
  • An API key from your OpenAI account to power the AI agent.

Set up steps:

  1. Get your OpenAI API Key - https://platform.openai.com/api-keys
  2. Add your OpenAI API Key to OpenAI Chat Model node in n8n workflow.
  3. Get your Client ID and Client Secret from your SendPulse account - https://login.sendpulse.com/settings/#api
  4. Add your Client ID and Client Secret to Workflow Configuration node.
  5. Add your Client ID and Client Secret to SendPulse MCP Client node as headers X-SP-ID і X-SP-SECRET in Multiple Headers Auth.
  6. In the Workflow Configuration node, change the names of the mailing lists, senderName, senderEmail, smsSender, routeCountryCode and routeType fileds as needed.
  7. Create a tokens table with the columns: hash (string), accessToken (string), tokenExpiry (string) in the Data tables section of your n8n platform account.

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 - OpenAI Chat Model

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

Block 2 - Get New Access Token

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 3 - Get Token from Storage

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

Block 4 - Save Token to Storage

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

Block 5 - Generate Hash

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

Block 6 - Workflow Configuration

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

Block 7 - Is Token Expired?

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

Block 8 - Exists phone?

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

Block 9 - Exists email?

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

Block 10 - Create mailing list with phones

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 11 - Search Mailing Lists With Phone Numbers

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

Block 12 - Search Mailing Lists With Emails

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

Block 13 - Is Exists Mailing List With Phone Numbers

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

Block 14 - SendPulse MCP Client

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

Block 15 - Set Access Token

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

Block 16 - Exists Mailing List With Emails?

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

Block 17 - Create Mailing List With Emails

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 18 - Generate And Send Welcome Email

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

Block 19 - Generate Welcome SMS

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

Block 20 - Add Email to Mailing List

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 21 - Add Phone Number to Mailing List

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 22 - Send SMS to Client

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 23 - Sticky Note4

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

Block 24 - Sticky Note5

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

Showing the first 24 of 30 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Lead collection with SendPulse and GPT-generated welcome emails/SMS
Complexity advanced
Nodes 30
Categories Lead Nurturing, Multimodal AI
Author SendPulse
Published 16 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11868/11868.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 Lead collection with SendPulse and GPT-generated welcome emails/SMS do?

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 [ SendPu...

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, Multimodal AI use case.