Personalized B2B/B2C Welcome Email Sender using AI - n8n Workflow

Use this powerful n8n workflow to send context-aware, personalized welcome emails via Gmail to leads captured through JotForm, utilizing GPT-4o and Perplexity AI for deep personalization.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales and Marketing Teams: Seeking to automate first-touch communications and improve conversion rates.

  • Businesses with Mixed Audiences: Companies serving both business clients and individual consumers.

  • Automation Specialists: Looking for advanced examples of conditional logic within an n8n workflow.

  • Content Creators: Requiring a high-performance n8n node setup for dynamic email generation.

Overview

This comprehensive n8n workflow addresses the widespread issue of sending generic welcome messages to a diverse audience. By intelligently filtering leads based on their email domain, this n8n automation template ensures that outreach is always contextually relevant. The core of this n8n workflow lies in its smart branching logic:


  1. B2B Personalization: If a work email is detected, the workflow activates a Perplexity AI n8n node to perform in-depth company research. This research is then fed to an OpenAI n8n node, allowing it to generate a highly personalized email referencing industry specifics.

  2. B2C Efficiency: If a personal email is detected, the resource-intensive research step is skipped, and a warm, immediate welcome email is generated by OpenAI.

This robust n8n workflow significantly enhances lead engagement and reduces the manual effort required for lead qualification, making it one of the most effective n8n templates for modern communication strategies.

How it Works

The entire process is initiated by the n8n trigger, monitoring for new submissions:


  1. Trigger Initiation: The On New JotForm Submission n8n trigger activates the workflow upon receiving new form data, including the lead's name and email.

  2. Domain Extraction: A Set n8n node extracts the domain name from the lead's email address.

  3. Conditional Routing: The If Work Email n8n node uses conditional logic to determine if the domain is a common personal one (e.g., gmail.com).

  4. B2B Path (If True): The Research Company via Perplexity AI n8n node uses the domain name to gather comprehensive company details. This data is passed to the AI Company Email Writer n8n node (powered by OpenAI GPT-4o), which drafts a professional, research-backed welcome email.

  5. B2C Path (If False): The AI Personal Email Writer n8n node (also using OpenAI GPT-4o) generates a friendly, direct B2C welcome email.

  6. Merging and Sending: Both paths converge at the Merge n8n node. Finally, the Send Welcome Email n8n node utilizes the generated content and the lead's email address to instantly deliver the personalized message via Gmail.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON data and import it into your self-hosted or cloud n8n instance.

  2. Credentials Setup:

JotForm: Connect your JotForm account credentials to the On New JotForm Submission n8n trigger. Select the form you wish to monitor (ensure it captures name and email fields).
OpenAI: Set up credentials for your OpenAI API account. Note that this n8n workflow uses the Langchain AI Agent nodes.
Perplexity AI: Configure credentials for your Perplexity AI API access.
Gmail: Set up OAuth2 credentials for the Gmail n8n node to enable email sending.

  1. Customization: Review the conditional logic in the If Work Email n8n node and update the list of personal domains if necessary. Adjust the system prompts in the AI Agent nodes (AI Company Email Writer and AI Personal Email Writer) to match your desired brand tone.

  2. Activation: Save and activate the n8n workflow to begin automated lead processing.

Node Details

On New JotForm Submission (JotForm Trigger): The starting n8n trigger for the entire automation. It listens for new form submissions and extracts lead data.
Extract Domain from Email (Set Node): A utility n8n node that uses an expression (={{ $json.email.split('@')[1] }}) to cleanly isolate the domain name, essential for the subsequent conditional logic.
If Work Email (If Node): The central decision-making n8n node. It checks if the extracted domain is on a predefined list of personal domains. This logic dictates whether the workflow proceeds down the resource-intensive B2B path or the streamlined B2C path.
Research Company via Perplexity AI (Perplexity Node): If a B2B lead is detected, this n8n node executes a detailed research query using the domain name to gather competitive and operational intelligence.
OpenAI Chat Model / OpenAI Chat Model1 (OpenAI Nodes): These nodes provide the language model backbone (GPT-4o) for the AI Agent nodes, enabling sophisticated text generation within the n8n workflow.
AI Company Email Writer / AI Personal Email Writer (AI Agent Nodes): These powerful n8n nodes utilize the research context (for B2B) or just the basic form data (for B2C) to construct high-quality, targeted email content based on defined system messages.


  • Send Welcome Email (Gmail Node): The final action n8n node. It dynamically pulls the AI-generated email body and subject line, addressing the email to the original lead.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

AI Automation Developer

Featured*