AutomationFlowsAI & RAG › Lead Workflow

Lead Workflow

Lead-Workflow. Uses googleSheets, emailSend, lmChatAnthropic, chainLlm. Webhook trigger; 12 nodes.

Webhook trigger★★★★☆ complexityAI-powered12 nodesGoogle SheetsEmail SendAnthropic ChatChain LlmHTTP Request
AI & RAG Trigger: Webhook Nodes: 12 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Chainllm → Emailsend recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "contact-form",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -100,
        180
      ],
      "id": "b64fe6aa-0bf7-4eec-9e33-e3216ffdfce7"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "$GOOGLE_SHEETS_DOCUMENT_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Sheet1",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "timestamp": "={{ $now.toISO() }}",
            "email": "={{ $json.body.email }}",
            "company": "={{ $json.body.company || '' }}",
            "phone": "={{ $json.body.phone || '' }}",
            "serviceInterest": "={{ $json.body.serviceInterest }}",
            "message": "={{ $json.body.message }}",
            "status": "=new",
            "lastContact": "={{ $now.toISO() }}",
            "name": "={{ $json.body.name }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "timestamp",
              "displayName": "timestamp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "serviceInterest",
              "displayName": "serviceInterest",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "message",
              "displayName": "message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "lastContact",
              "displayName": "lastContact",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        120,
        180
      ],
      "id": "1311d3d9-e3ad-45bc-b2ae-207adb7f196f",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "contact@communik-via-ia.com",
        "toEmail": "={{ $json.email || $DEFAULT_EMAIL }}",
        "subject": "Merci pour votre message - Communik via IA",
        "html": "=<div style=\"font-family: 'Segoe UI', Arial, sans-serif; max-width: 600px; margin: 0 auto; color: #333; line-height: 1.5;\">\n  <!-- Header with gradient background -->\n  <div style=\"background-color: #1D4ED8; padding: 25px; text-align: center; border-radius: 8px 8px 0 0;\">\n    <h1 style=\"color: white; margin: 0; font-weight: 600; letter-spacing: 0.5px;\">Communik via IA</h1>\n  </div>\n  \n  <!-- Main content -->\n  <div style=\"padding: 35px; border: 1px solid #e5e5e5; border-top: none; background-color: #ffffff; border-radius: 0 0 8px 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);\">\n    <!-- Greeting -->\n    <p style=\"font-size: 17px;\">Bonjour <strong>{{ $json.name }}</strong>,</p>\n    \n    <!-- Introduction -->\n    <p style=\"margin-bottom: 25px;\">Merci d'avoir pris contact avec Communik via IA. Nous avons bien re\u00e7u votre demande concernant nos services de <strong style=\"color: #1D4ED8;\">{{ $json.serviceInterest }}</strong>.</p>\n    \n    <!-- Analysis box -->\n    <div style=\"margin: 30px 0; padding: 20px; background-color: #f8f9fa; border-left: 4px solid #1D4ED8; border-radius: 4px;\">\n      <h3 style=\"margin-top: 0; color: #1D4ED8; font-size: 18px;\">Notre analyse de votre besoin :</h3>\n      <p style=\"margin-bottom: 20px; color: #444;\">{{ JSON.parse($json.text).summary }}</p>\n      \n      <h3 style=\"color: #1D4ED8; font-size: 18px;\">Notre suggestion :</h3>\n      <p style=\"color: #444;\">{{ JSON.parse($json.text).suggestedOffer }}</p>\n    </div>\n    \n    <!-- Call to action -->\n    <p style=\"margin-bottom: 25px;\">Nous aimerions discuter plus en d\u00e9tail de votre projet. R\u00e9servez un cr\u00e9neau avec notre \u00e9quipe en cliquant sur le lien ci-dessous :</p>\n    \n    <!-- Button -->\n    <div style=\"text-align: center; margin: 35px 0;\">\n      <a href=\"$CALENDLY_URL\" style=\"background-color: #1D4ED8; color: white; padding: 14px 28px; text-decoration: none; border-radius: 6px; font-weight: 600; display: inline-block;\">Prendre Rendez-vous</a>\n    </div>\n    \n    <!-- Closing -->\n    <p>Si vous avez des questions, n'h\u00e9sitez pas \u00e0 nous contacter directement \u00e0 cette adresse email.</p>\n    \n    <p style=\"margin-top: 30px; border-top: 1px solid #eaeaea; padding-top: 20px;\">\n      Cordialement,<br>\n      <strong>L'\u00e9quipe Communik via IA</strong>\n    </p>\n  </div>\n  \n  <!-- Footer -->\n  <div style=\"text-align: center; padding: 20px; color: #6b7280; font-size: 14px;\">\n    <p>\n      Communik via IA - 123 Avenue de l'Innovation, 75001 Paris<br>\n      contact@communik-via-ia.com - +33 1 23 45 67 89\n    </p>\n  </div>\n</div>",
        "options": {}
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        716,
        -20
      ],
      "id": "5b5afe88-3d3b-4f13-af7e-be2f2e467655",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        -100,
        640
      ],
      "id": "5aa74b1a-825b-4ce2-9220-27010b4f65c8"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "$GOOGLE_SHEETS_DOCUMENT_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Sheet1",
          "mode": "name"
        },
        "options": {}
      },
      "name": "Get All Leads",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        120,
        640
      ],
      "id": "c360f15f-c1f5-47c7-b6f1-dfc313647806",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.status }}",
              "value2": "new"
            }
          ],
          "dateTime": [
            {
              "value1": "={{ $json.lastContact }}",
              "operation": "before",
              "value2": "={{ $now.minus({days: 2}).toISO() }}"
            }
          ]
        }
      },
      "name": "Find Leads Needing Follow-up",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        340,
        640
      ],
      "id": "192da33f-c5f6-4cf0-bce1-1283a02e4587"
    },
    {
      "parameters": {
        "fromEmail": "contact@communik-via-ia.com",
        "toEmail": "={{ $json.email || $DEFAULT_EMAIL }}",
        "subject": "Suivi - Votre demande chez Communik via IA",
        "html": "=<div style=\"font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto;\">\n  <div style=\"background-color: #1D4ED8; padding: 20px; text-align: center;\">\n    <h1 style=\"color: white; margin: 0;\">Communik via IA</h1>\n  </div>\n  \n  <div style=\"padding: 30px; border: 1px solid #e5e5e5; border-top: none;\">\n    <p>Bonjour {{ $json.name }},</p>\n    \n    <p>Nous avons remarqu\u00e9 que vous nous avez contact\u00e9 il y a quelques jours concernant nos services de <strong>{{ $json.serviceInterest }}</strong>.</p>\n    \n    <p>Nous aimerions savoir si vous souhaitez toujours discuter de votre projet avec notre \u00e9quipe. Vous pouvez prendre rendez-vous en cliquant sur le lien ci-dessous :</p>\n    \n    <div style=\"text-align: center; margin: 30px 0;\">\n      <a href=\"$CALENDLY_URL\" style=\"background-color: #1D4ED8; color: white; padding: 12px 24px; text-decoration: none; border-radius: 4px; font-weight: bold;\">Prendre Rendez-vous</a>\n    </div>\n    \n    <p>Si vous avez des questions ou si vos besoins ont chang\u00e9, n'h\u00e9sitez pas \u00e0 nous en informer.</p>\n    \n    <p>Cordialement,<br>L'\u00e9quipe Communik via IA</p>\n  </div>\n  \n  <div style=\"text-align: center; padding: 20px; color: #6b7280; font-size: 14px;\">\n    <p>Communik via IA - 123 Avenue de l'Innovation, 75001 Paris<br>\n    contact@communik-via-ia.com - +33 1 23 45 67 89</p>\n  </div>\n</div>",
        "options": {}
      },
      "name": "Send Follow-up Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        560,
        640
      ],
      "id": "7dc5908c-c602-44c2-97e7-b8d9018c0835",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "$GOOGLE_SHEETS_DOCUMENT_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Sheet1",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "status": "=followed-up",
            "lastContact": "={{ $now.toISO() }}",
            "email": "={{ $json.accepted }}"
          },
          "matchingColumns": [
            "email"
          ],
          "schema": [
            {
              "id": "timestamp",
              "displayName": "timestamp",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "company",
              "displayName": "company",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "phone",
              "displayName": "phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "serviceInterest",
              "displayName": "serviceInterest",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "message",
              "displayName": "message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "lastContact",
              "displayName": "lastContact",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "name": "Update Lead Status",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        780,
        640
      ],
      "id": "c0b65762-cf56-4cd6-a1da-d6c0336e9ace",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "$CLAUDE_MODEL_ID",
          "mode": "list",
          "cachedResultName": "Claude 3.5 Sonnet (New)"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        428,
        400
      ],
      "id": "26223a4f-62d4-466e-bd7b-ec6a86f39876",
      "name": "Anthropic Chat Model",
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Name: {{ $json.name }}\nCompany: {{ $json.company || 'Not specified' }}\nService Interest: {{ $json.serviceInterest }}\nMessage: {{ $json.message }}\n\nAs the Communik via IA agency, write a personalized response:\n1. A friendly summary of how you understand their request (3-4 sentences)\n2. A suggested offer written in a conversational, engaging style (2-3 sentences)\n3. Category of need (one of: branding, website, ai-strategy, automation, or multiple)\n\nWrite in first person as if you are directly responding to the client. Use a warm, professional tone.\nFormat your response as a valid JSON object with fields \"summary\", \"suggestedOffer\", and \"category\".",
        "hasOutputParser": true,
        "messages": {
          "messageValues": [
            {
              "message": "=You are a communication professional at Communik via IA agency, writing personalized responses to potential clients(using the same language they are speaking to you).  Name: {{ $json.name }} Company: {{ $json.company || 'Not specified' }} Service Interest: {{ $json.serviceInterest }} Message: {{ $json.message }}  Write a response with: 1. A friendly, warm summary of how you understand their request (3-4 sentences) 2. A suggested offer written in a conversational, engaging style (2-3 sentences) 3. Category of need (one of: branding, website, ai-strategy, automation, or multiple)  Use a warm, professional tone as if speaking directly to the client. Your response must be a valid JSON object with fields \"summary\", \"suggestedOffer\", and \"category\"."
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.6,
      "position": [
        340,
        180
      ],
      "id": "cd629a99-7920-49fe-8a0e-6547714da400",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "$SLACK_WEBHOOK_URL",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "\u2728 Nouveau contact re\u00e7u !"
            }
          ]
        },
        "options": {}
      },
      "name": "Slack Notification1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        716,
        380
      ],
      "id": "f2218b33-fb9b-48a4-bf0e-7bbaeb42f854"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "$TWILIO_API_URL",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "authorization",
              "value": "$TWILIO_AUTH_TOKEN"
            }
          ]
        },
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "To",
              "value": "$WHATSAPP_TO_NUMBER"
            },
            {
              "name": "From",
              "value": "$TWILIO_WHATSAPP_NUMBER"
            },
            {
              "name": "Body",
              "value": "\u2728 Nouveau contact re\u00e7u !"
            }
          ]
        },
        "options": {}
      },
      "name": "Whatsapp Notification",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        716,
        180
      ],
      "id": "c7462ca6-d1ac-4f49-b070-ead9b6843661"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Leads": {
      "main": [
        [
          {
            "node": "Find Leads Needing Follow-up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Leads Needing Follow-up": {
      "main": [
        [
          {
            "node": "Send Follow-up Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Follow-up Email": {
      "main": [
        [
          {
            "node": "Update Lead Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Slack Notification1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Whatsapp Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6d373a7e-9df2-438f-96e8-5b5982446d7c",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "$WORKFLOW_ID",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Lead-Workflow. Uses googleSheets, emailSend, lmChatAnthropic, chainLlm. Webhook trigger; 12 nodes.

Source: https://github.com/Bantaaa/Communik-via-IA/blob/accd48b7b5b0337492abc845762a9a7e1b453dc4/n8n-workflows/lead-workflow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Stop treating document review as a manual task. Let AI extract, classify, and route every contract, invoice, and NDA automatically.

HTTP Request, Chain Llm, Email Send +4
AI & RAG

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages La

Google Sheets, HTTP Request, Slack +10
AI & RAG

Tired of grinding out YouTube content? This n8n workflow turns AI into your personal video factory—creating engaging, faceless shorts on autopilot. Perfect for creators, marketers, or side-hustlers lo

HTTP Request, Google Drive, Google Sheets +6
AI & RAG

Faceless YouTube Generator. Uses httpRequest, limit, googleDrive, googleSheets. Webhook trigger; 49 nodes.

HTTP Request, Google Drive, Google Sheets +7
AI & RAG

This workflow turns a spreadsheet row into a fully formatted, media-rich WordPress article. It pulls the outline and brand context from Google Sheets/Docs, drafts the article with Anthropic or Gemini,

Agent, Google Sheets, Google Docs +5