Skip to main content

LeadChat Booker — conversational lead capture that schedules

Workflow preview

Workflow preview
100%
LeadChat Booker — conversational lead capture that schedules preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Real Working Demo https://crmaiinsight.com/leadbot How It Works (High Level) 1) Chat Capture LeadBot greets, collects Full Name → Email → Mobile (optional) ...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.salesforcetool, @n8n/n8n-nodes-langchain.toolthink, n8n-nodes-base.emailsendtool, n8n-nodes-base.slacktool, n8n-nodes-base.httprequesttool

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
LeadChat Booker — conversational lead capture that schedules
Workflow name
LeadChat Booker — conversational lead capture that schedules

Real Working Demo

https://crmaiinsight.com/leadbot

How It Works (High-Level)

  1. Chat > Capture
    LeadBot greets, collects Full Name → Email → Mobile (optional) → Product interest via friendly chat (no forms).

    • Validates email/phone, confirms inputs, supports corrections.
  2. De-dupe
    Checks Salesforce for an existing lead by Email.

    • If found → update_lead. If not → create_lead.
  3. Product Selection
    Pulls your Feature_Product__c list (Name + one-line Description) and lets the user choose by number or name.

  4. Demo Booking (Optional)
    If the user says Yes:

    • Detect/ask Time Zone (IANA).
    • Reads Salesforce Events for the next 14 days.
    • Computes free 30-min weekday slots (09:00–17:00 UTC) strictly after now.
    • User picks a slot → creates a Salesforce Event (30 min) linked to the Lead.
  5. Notifications & Follow-ups

    • Slack DM to your team (concise summary).
    • Email confirmation to the prospect (local date/time included).
    • Ends with a polite confirmation message.

Setup at a Glance

  • Effort: Most teams finish the base setup in ~45–90 minutes (credentials, field mapping, test).
  • What you’ll configure: Salesforce OAuth, SMTP (or your ESP), Slack, OpenAI key, and the web chat widget.

> Tip: Start with the provided Feature_Product__c object. You can switch to your own product catalog with a few tweaks (see below).


Prerequisites

  • Salesforce

    • Connected App + OAuth (API enabled).
    • Lead fields: FirstName, LastName, Email, MobilePhone, and one product lookup/text field (e.g., Interested_Product__c or Feature_Product__c).
    • (Recommended) Custom object Feature_Product__c with fields: Name, Description__c, Features__c, Tags__c.
  • n8n Credentials

    • salesforceOAuth2Api (to read/write Leads & Events).
    • smtp (or use your email provider node).
    • slackApi (for internal notifications).
    • openAiApi (for the chat agent).
  • Widget Embed (optional)

    • A place on your site/app to embed the chat launcher.

Step-by-Step Setup

  1. Import the flow into n8n

    • Verify nodes: Chat Trigger → AI Agent → check_duplicate_lead → update/create lead → get_products → get_scheduled_events → create_demo_event → Slack/Email.
  2. Add/Bind Credentials

    • Salesforce OAuth: authorize org with API scope.
    • SMTP: sender, domain, and authentication (verify SPF/DKIM).
    • Slack: ensure bot can DM users/channels.
    • OpenAI: drop in your API key.
  3. Map Product Field on Lead

    • Pick one field to store the selection (e.g., Interested_Product__c).
    • Ensure AI Agent and Salesforce nodes reference the same field.
  4. (Option A) Use Feature_Product__c

    • Confirm fields exist: Name, Description__c (used in the numbered list).
    • In get_products, make sure Id is returned; pass it as customFieldsValues0_Value.
  5. (Option B) Use Your Own Catalog

    • Swap customObject: Feature_Product__cProduct2 (or your object).
    • Update fields to at least: Id, Name, and a short description field.
    • Keep the variable contract the same (AI expects to store Id, name, description).
  6. Configure Demo Booking

    • get_scheduled_events uses a SOQL search window (today → +14 days).
    • Ensure your Event permissions allow read/write.
    • Confirm create_demo_event URL points to your Salesforce domain & API version.
  7. Customize Widget (optional)

    • Set title, brand colors, and initial message in the Chat Trigger options.
    • Limit reply length (≤100 words) is already set.
  8. Test End-to-End

    • Run a full path: enter name/email/phone, pick a product, select a time slot.
    • Verify: Lead/Update in Salesforce, Event creation, Slack DM, Prospect Email.

Switching to Your Own Products (Quick Tweaks)

  • Replace Data Source:
    • In get_products:
      • customObject: Product2 (or your object API name).
      • Fields: ensure Id, Name, and a short description are returned.
  • Update Lead Field Mapping:
    • Set Interested_Product__c (or your chosen field) to the returned Product Id.
  • Copy Text Logic:
    • Keep the AI’s “numbered list” output; it supports both number and name replies.

What Users Experience

  • No forms. A friendly AI asks one thing at a time, confirms details, and offers a live calendar of the next available 30-minute demo slots.
  • The moment they choose, a Salesforce Event is created and they get a confirmation email.
  • Your team receives a Slack heads-up with who/what/when.

Troubleshooting Quick Checks

  • No product list? Ensure Id, Name, Description__c (or equivalent) are returned by get_products.
  • No free slots shown? Confirm Event query window (+14 days), timezone handling, and that “current time” filter excludes past times.
  • Lead not updated? Check the duplicate search by Email and that update_lead receives Lead_ID.
  • Event fails to create? Verify Salesforce API endpoint, OAuth scope, and required Event fields.

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 - AI Agent

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

Block 2 - OpenAI Chat Model

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

Block 3 - Simple Memory

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

Block 4 - check_duplicate_lead

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

Block 5 - Think

Type / Role
@n8n/n8n-nodes-langchain.toolThink - toolThink
Config choices
Version 1

Block 6 - update_lead

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

Block 7 - create_lead

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

Block 8 - send_notification_client

Type / Role
n8n-nodes-base.emailSendTool - emailSendTool
Config choices
Version 2.1

Block 9 - send_notification_internal

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

Block 10 - get_products

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

Block 11 - get_scheduled_events

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

Block 12 - create_demo_event

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 13 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 14 - Sticky Note3

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

Block 15 - Sticky Note1

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

Block 16 - Sticky Note2

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

Block 17 - Sticky Note8

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

Block 18 - Sticky Note7

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

Block 19 - Sticky Note

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

Block 20 - Sticky Note4

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

Block 21 - Sticky Note5

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

Block 22 - Sticky Note6

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

Block 23 - Sticky Note9

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

Block 24 - Sticky Note10

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

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

3. Summary Table

Workflow LeadChat Booker — conversational lead capture that schedules
Complexity advanced
Nodes 25
Categories Lead Nurturing, AI Chatbot
Author Le Nguyen
Published 29 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8018/8018.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 LeadChat Booker — conversational lead capture that schedules do?

Real Working Demo https://crmaiinsight.com/leadbot How It Works (High Level) 1) Chat Capture LeadBot greets, collects Full Name → Email → Mobile (optional) ...

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