{
  "name": "Real-time lead response across social channels with Llama AI & Google Sheets",
  "nodes": [
    {
      "id": "a937adda-e5bb-49ab-a760-4cd6c779edf5",
      "name": "google-sheet-name",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3472,
        1504
      ]
    },
    {
      "id": "339a501b-3dba-4629-b7a4-67fbed7874c2",
      "name": "Normalize Lead Data5",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1776
      ]
    },
    {
      "id": "9b0e167e-b6e7-4bc6-8d95-32c5c3736858",
      "name": "Switch2",
      "type": "n8n-nodes-base.switch",
      "position": [
        1216,
        1472
      ]
    },
    {
      "id": "e61c8682-46a8-470d-ab73-ef5b02f2ca46",
      "name": "Switch3",
      "type": "n8n-nodes-base.switch",
      "position": [
        2560,
        1472
      ]
    },
    {
      "id": "cf5b0f33-4005-4b65-ab58-127e5bfd8253",
      "name": "Send Instagram Message1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2912,
        1376
      ]
    },
    {
      "id": "faaa7f61-3222-4474-9006-cd76a111cbba",
      "name": "Send Facebook Messages1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2912,
        1504
      ]
    },
    {
      "id": "7f501e2d-bac7-4473-987f-6441d6b38c48",
      "name": "Send Linkdin Messages1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2912,
        1632
      ]
    },
    {
      "id": "9b2eb0f0-2cc7-4a20-bcb6-df0a8cea019e",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2912,
        1776
      ]
    },
    {
      "id": "69c124cd-1151-4f56-8e0d-f921538ae313",
      "name": "Extract Day and Hours1",
      "type": "n8n-nodes-base.code",
      "position": [
        1440,
        1520
      ]
    },
    {
      "id": "528f6426-89a3-486e-9601-7bca8fd8c501",
      "name": "Is Working Day and Working Hour?1",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        1520
      ]
    },
    {
      "id": "a3db709e-8f9c-44c6-992e-b68425524b9e",
      "name": "Code in JavaScript3",
      "type": "n8n-nodes-base.code",
      "position": [
        1888,
        1520
      ]
    },
    {
      "id": "ba18a7de-d274-4da7-99ca-d1a74192896f",
      "name": "Code in JavaScript4",
      "type": "n8n-nodes-base.code",
      "position": [
        2336,
        1520
      ]
    },
    {
      "id": "da9b7d3d-3702-4ccd-bd0d-6f0da765bd6e",
      "name": "Code in JavaScript5",
      "type": "n8n-nodes-base.code",
      "position": [
        3248,
        1504
      ]
    },
    {
      "id": "ee3b4efa-93b3-455d-ace2-321b7f4cce62",
      "name": "Incomming Lead whatsapp1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        592,
        1264
      ]
    },
    {
      "id": "63065ea1-8c5d-43aa-8633-48d3832c9c3f",
      "name": "Incomming Lead facebook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        592,
        1392
      ]
    },
    {
      "id": "82b51674-503b-49ee-b7c4-d8b52e1f126a",
      "name": "Incomming Lead instagram1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        592,
        1520
      ]
    },
    {
      "id": "04401034-0ee1-47bc-9b74-79942275a234",
      "name": "Incomming Lead linkdin1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        592,
        1648
      ]
    },
    {
      "id": "64405af6-6c6f-46e2-a121-27ed34de3f6c",
      "name": "Incomming Lead Website1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        592,
        1776
      ]
    },
    {
      "id": "e1df306c-005d-4297-b70b-84ec5eddb86d",
      "name": "Normalize Lead Data6",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1264
      ]
    },
    {
      "id": "de89802e-eae2-49c7-b91e-ecfff14a5528",
      "name": "Normalize Lead Data7",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1392
      ]
    },
    {
      "id": "4ce6a3f6-c87d-4059-b245-3d6ff574bca7",
      "name": "Normalize Lead Data8",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1520
      ]
    },
    {
      "id": "530fcf4c-9ce9-482f-bd75-0be22ce6be1d",
      "name": "Normalize Lead Data9",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        1648
      ]
    },
    {
      "id": "a6917e9d-29e1-4920-9ef5-71f39cdb5300",
      "name": "Get Ai Response1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2112,
        1520
      ]
    },
    {
      "id": "2a6212f9-91e7-4cb6-98a3-34588d59de86",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2912,
        1264
      ]
    },
    {
      "id": "742a220e-1611-4de5-8510-e26440573888",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        1088
      ],
      "parameters": {
        "width": 592,
        "height": 896,
        "content": "## Instant Reply SDR Worker (Multi-Channel Lead Auto-Responder)\n\nThis workflow acts as a real-time SDR that instantly responds to incoming leads across WhatsApp, Website, Instagram, Facebook, and Link"
      }
    },
    {
      "id": "ffc9b41b-03cc-4018-8d57-a98959c3edf6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        1088
      ],
      "parameters": {
        "width": 816,
        "height": 896,
        "content": "## Step 1: Lead Intake & Normalization\nCaptures incoming leads from WhatsApp, Website, Instagram, Facebook, and LinkedIn, then standardizes all lead data into a single structure.\n"
      }
    },
    {
      "id": "5347f93b-6378-43d5-9c9e-eb7dc349cbc8",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1088
      ],
      "parameters": {
        "width": 880,
        "height": 896,
        "content": "## Step 2: Working Hours & AI Response\nEvaluates IST working hours and generates a context-aware AI response suited to the channel and timing.\n"
      }
    },
    {
      "id": "ab354c64-38ac-44f4-bde2-6e786d53cd65",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        1088
      ],
      "parameters": {
        "width": 1376,
        "height": 896,
        "content": "## Step 3: Send Reply & Log Data\nRoutes the response to the correct channel, sends it to the lead, and logs the full interaction into Google Sheets.\n"
      }
    }
  ],
  "connections": {
    "Switch2": {
      "main": [
        [
          {
            "node": "Extract Day and Hours1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Day and Hours1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Day and Hours1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Day and Hours1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Day and Hours1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch3": {
      "main": [
        [
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Instagram Message1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Facebook Messages1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Linkdin Messages1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message1": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Ai Response1": {
      "main": [
        [
          {
            "node": "Code in JavaScript4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Get Ai Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript4": {
      "main": [
        [
          {
            "node": "Switch3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript5": {
      "main": [
        [
          {
            "node": "google-sheet-name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data5": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data6": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data7": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data8": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data9": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Day and Hours1": {
      "main": [
        [
          {
            "node": "Is Working Day and Working Hour?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Linkdin Messages1": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incomming Lead Website1": {
      "main": [
        [
          {
            "node": "Normalize Lead Data5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incomming Lead linkdin1": {
      "main": [
        [
          {
            "node": "Normalize Lead Data9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Facebook Messages1": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Instagram Message1": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incomming Lead facebook1": {
      "main": [
        [
          {
            "node": "Normalize Lead Data7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incomming Lead whatsapp1": {
      "main": [
        [
          {
            "node": "Normalize Lead Data6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incomming Lead instagram1": {
      "main": [
        [
          {
            "node": "Normalize Lead Data8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Working Day and Working Hour?1": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}