{
  "name": "Compare products and generate visual scorecards in Telegram with BrowserAct and Gemini",
  "nodes": [
    {
      "id": "00443c4f-7e34-4536-b5bc-e60ffeea03cf",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1328,
        496
      ]
    },
    {
      "id": "b2db339f-929b-448f-a4b9-216f9fe5ab36",
      "name": "Validate user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1456,
        288
      ]
    },
    {
      "id": "4ec6c427-0614-4385-810f-c2880b16896c",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1456,
        512
      ]
    },
    {
      "id": "ad250028-1bbd-42a3-8d95-e99249866adb",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -224,
        224
      ]
    },
    {
      "id": "cd6c58da-d64f-4f2e-8a23-b0d80b3c4e0d",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        576,
        304
      ]
    },
    {
      "id": "1566518d-70af-4d9f-b8a3-fb40660769a1",
      "name": "Structured Output1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1152,
        304
      ]
    },
    {
      "id": "daf73d94-dbf2-499a-ab5d-a7b957bee717",
      "name": "Generate Image and Description",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1024,
        80
      ]
    },
    {
      "id": "522f2f93-5fb5-4124-83d0-59bdb969ffc8",
      "name": "Analyze the data",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        464,
        80
      ]
    },
    {
      "id": "332dfd02-bb3d-4068-932c-b8ed62e0bf97",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1616,
        288
      ]
    },
    {
      "id": "4a404ecd-32a5-4ae5-a676-a3c9caa15dad",
      "name": "Validation Type Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1104,
        288
      ]
    },
    {
      "id": "6bb18910-81a2-4b2d-8305-8e6f056b1477",
      "name": "Process Initialization Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -816,
        80
      ]
    },
    {
      "id": "1873a93f-f127-4eda-b46e-a5631ddfcbac",
      "name": "Clear Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -816,
        240
      ]
    },
    {
      "id": "94fe7088-9c67-43b2-8395-81388ed156c3",
      "name": "Split Out Extracted Products",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -576,
        224
      ]
    },
    {
      "id": "9411da22-c1f1-4e0a-8b42-b1cca828c95e",
      "name": "Search for each product's data.",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        0,
        240
      ]
    },
    {
      "id": "1b28e259-ecde-4916-be2c-151fcd5aa75c",
      "name": "Save Product Information to Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        224,
        336
      ]
    },
    {
      "id": "64ccac17-c951-42cf-942a-51198b5146d6",
      "name": "Google Gemini 1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -192,
        736
      ]
    },
    {
      "id": "0694d83b-b2c2-47ea-8f6f-50f6ec2b61aa",
      "name": "Google Gemini 2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        464,
        304
      ]
    },
    {
      "id": "bed7fd4a-34f3-44ab-962b-54fcec479dfe",
      "name": "Google Gemini 3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1024,
        304
      ]
    },
    {
      "id": "13d65a2e-62c2-4698-b84a-bda899ba5de3",
      "name": "Retrieve Data from Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        16,
        80
      ]
    },
    {
      "id": "3681e438-0944-424d-8e9b-622f23d35d57",
      "name": "Aggregate Google Sheet Data",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        240,
        80
      ]
    },
    {
      "id": "bf026895-2448-4fd6-864e-43071ba9bea3",
      "name": "Generate Comparison Image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1424,
        80
      ]
    },
    {
      "id": "89057c4b-00fc-4089-ba53-9ddf3818200a",
      "name": "Send Photo Message to Bot",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1680,
        80
      ]
    },
    {
      "id": "49ed8e71-6ec2-4c4d-bd0f-b9cea48ddeab",
      "name": "Answer the User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        160,
        592
      ]
    },
    {
      "id": "2106e30c-c2f5-4b90-bcbb-a1b45559bf19",
      "name": "Conversational AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -192,
        592
      ]
    },
    {
      "id": "8a4ac95b-86a4-4ff0-915a-40b55963594e",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2016,
        -480
      ],
      "parameters": {
        "width": 380,
        "height": 520,
        "content": "## ⚡ Workflow Overview & Setup\n\n**Summary:** This automation takes a user request to compare two products (via Telegram), scrapes their details using BrowserAct, performs a deep AI analysis, and gener"
      }
    },
    {
      "id": "8389c787-624b-44fa-a5fa-77cd328b8498",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -80
      ],
      "parameters": {
        "width": 1116,
        "height": 124,
        "content": "### 🔍 Step 1: Intent Analysis\n\nThe workflow intercepts Telegram messages to identify product comparison requests. An AI agent classifies the input and determines the best source (e.g., Amazon, G2, Tru"
      }
    },
    {
      "id": "55a60255-774b-43cc-9792-a9b4e2a0fbe5",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -96
      ],
      "parameters": {
        "width": 1036,
        "height": 124,
        "content": "### 📊 Step 2: Data Extraction & Analysis\n\nBrowserAct scrapes detailed specs and reviews for both products. A specialized \"Comparison Engine\" AI then analyzes this data across four dimensions: Composit"
      }
    },
    {
      "id": "6f264315-f5b1-4d2e-8599-ef250580e4da",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -96
      ],
      "parameters": {
        "width": 908,
        "height": 124,
        "content": "### 🎨 Step 3: Visual Scorecard Generation\n\nUsing the analysis results, a \"Generative Information Architect\" AI creates a detailed image prompt. This prompt instructs the Nano Banana Pro model to rende"
      }
    },
    {
      "id": "852d8780-88fe-4d61-94c7-f5e508b83cfc",
      "name": "Step 4 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        864
      ],
      "parameters": {
        "width": 580,
        "height": 104,
        "content": "### 💬 Step 2-2: Conversational Fallback\n\nThis branch engages the user in natural conversation and chats with them if needed."
      }
    },
    {
      "id": "a7a137d4-dbd4-4f87-ad83-7031bab5c8bf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -480
      ],
      "parameters": {
        "width": 672,
        "height": 384,
        "content": "@[youtube](MCKLEF0m9ps)"
      }
    },
    {
      "id": "8b1e067d-605d-464c-8977-256f81969f35",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        224
      ],
      "parameters": {
        "width": 224,
        "height": 272,
        "content": "### 📊 Sheet Processing Requirements\n\n**File Name:** `Product Comparision`\n**Target Column:** `Product Data` (Cell A1)"
      }
    }
  ],
  "connections": {
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Clear Database": {
      "main": [
        [
          {
            "node": "Split Out Extracted Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini 1": {
      "ai_languageModel": [
        [
          {
            "node": "Conversational AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini 2": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze the data",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini 3": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Image and Description",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Retrieve Data from Database",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search for each product's data.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze the data": {
      "main": [
        [
          {
            "node": "Generate Image and Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversational AI": {
      "main": [
        [
          {
            "node": "Answer the User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze the data",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output1": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Image and Description",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Validate user Input": {
      "main": [
        [
          {
            "node": "Validation Type Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation Type Switch": {
      "main": [
        [
          {
            "node": "Process Initialization Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Clear Database",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Conversational AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Comparison Image": {
      "main": [
        [
          {
            "node": "Send Photo Message to Bot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Sends Message to Bot": {
      "main": [
        [
          {
            "node": "Validate user Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Google Sheet Data": {
      "main": [
        [
          {
            "node": "Analyze the data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Data from Database": {
      "main": [
        [
          {
            "node": "Aggregate Google Sheet Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Extracted Products": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image and Description": {
      "main": [
        [
          {
            "node": "Generate Comparison Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search for each product's data.": {
      "main": [
        [
          {
            "node": "Save Product Information to Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Product Information to Database": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}