{
  "name": "AI-powered review sentiment analysis to Salesforce & Google Sheets with Decodo",
  "nodes": [
    {
      "id": "e9618bd5-5db4-4b2c-9b16-41e757e7c818",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        464,
        576
      ]
    },
    {
      "id": "f3b60314-8e02-4a3a-b08f-78ea2a7becf1",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1504,
        352
      ]
    },
    {
      "id": "bab39db3-d0d7-422e-aff9-075909f6dd00",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1728,
        352
      ]
    },
    {
      "id": "be657b0c-23e1-4b8c-bd25-9915a5947358",
      "name": "Code in JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        2080,
        352
      ]
    },
    {
      "id": "7ce9b06a-402b-4ff6-b857-431f01c75f2a",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        688,
        560
      ]
    },
    {
      "id": "f26790bb-a333-4e1d-9309-f2e30a6c59fd",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2304,
        352
      ]
    },
    {
      "id": "6b7f37a7-354f-4f5d-a62b-d70aeb497387",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -144
      ],
      "parameters": {
        "width": null,
        "height": 1200,
        "content": "## What this workflow does\nThis workflow scrapes **customer reviews from Trustpilot**, analyzes them with AI, and keeps both **Salesforce** and **Google Sheets** automatically updated with customer se"
      }
    },
    {
      "id": "cac8d1e3-de91-47d4-96e8-7a4109a32d7b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        176
      ],
      "parameters": {
        "width": 384,
        "height": 128,
        "content": "##  Data Extraction  \nReads Trustpilot URLs and Salesforce Account IDs from Google Sheets and controls the execution flow"
      }
    },
    {
      "id": "19a14699-c1dd-4368-91cd-a91c7a5278a1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        176
      ],
      "parameters": {
        "width": 512,
        "height": 128,
        "content": "## AI Analysis  \nScrapes Trustpilot reviews via **Decodo**, cleans the text, and generates sentiment insights using OpenAI"
      }
    },
    {
      "id": "55190458-90d6-44b5-ae91-d9c0b05dd82d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3232,
        48
      ],
      "parameters": {
        "width": 848,
        "height": 624,
        "content": "## Data Output  \n![txt](https://ik.imagekit.io/agbb7sr41/salesforce_feedback.png)\n![txt](https://ik.imagekit.io/agbb7sr41/n8n_output_2.png)"
      }
    },
    {
      "id": "de95cc00-c6a2-4226-ab10-aa7d1b3d0efa",
      "name": "Decodo",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        1280,
        352
      ]
    },
    {
      "id": "bf870fff-71bd-4b9c-ac28-6b2b1fc64da3",
      "name": "Create or update an account",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        2976,
        476
      ]
    },
    {
      "id": "b63a97fe-e81f-42b3-bf4c-9a48766ea103",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1800,
        576
      ]
    },
    {
      "id": "6b55d083-2370-478a-812b-02cc06c7fa3a",
      "name": "Code in JavaScript2",
      "type": "n8n-nodes-base.code",
      "position": [
        2752,
        352
      ]
    },
    {
      "id": "669cde21-0d71-45d8-aae8-1104803a67b6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2528,
        352
      ]
    },
    {
      "id": "28e7741a-ef0b-470c-8d71-97fe9013a6d9",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1056,
        368
      ]
    },
    {
      "id": "45ac4709-d499-40f4-944a-b441f0e911ed",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        192
      ],
      "parameters": {
        "width": 448,
        "height": 128,
        "content": "## CRM + Google sheets update\nUpdates the Salesforce Account with the sentiment summary and stores full analytics in Google Sheets"
      }
    },
    {
      "id": "5311f4f3-49aa-463e-af61-20b09df7aaab",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        144
      ],
      "parameters": {
        "width": 480,
        "height": 288,
        "content": "## Input \n![txt](https://ik.imagekit.io/agbb7sr41/input_job_2-png.png)"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decodo": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Decodo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "Create or update an account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create or update an account": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}