{
  "name": "Sentiment analytics visualizer",
  "nodes": [
    {
      "id": "cb616bea-a6ad-4864-8169-9b0c24868761",
      "name": "📋 Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        40
      ],
      "parameters": {
        "width": 400,
        "height": 460,
        "content": "## 📋 SETUP REQUIRED\n\n**This workflow requires the following configurations:**\n\n1. **Google Sheets Connection**: Update all Google Sheets nodes with your spreadsheet ID\n2. **OpenAI API**: Add your Open"
      }
    },
    {
      "id": "da05ebb8-6027-43d9-8c56-42d33d6d5f78",
      "name": "🔧 Configure Google Sheets",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -160
      ],
      "parameters": {
        "width": 300,
        "height": 340,
        "content": "## 🔧 CUSTOMIZE THIS NODE\n\n**Google Sheets Configuration:**\n1. Replace the documentId with your Google Sheets ID\n2. Select the correct sheet name\n3. Ensure your sheet has 'Review title' and 'Review tex"
      }
    },
    {
      "id": "a07f32b5-1f38-4f61-b2c4-1e91b0df9512",
      "name": "🤖 Configure OpenAI",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        740
      ],
      "parameters": {
        "width": 420,
        "height": 200,
        "content": "## 🤖 CUSTOMIZE THIS NODE\n\n**OpenAI Configuration:**\n1. Add your OpenAI API credentials\n2. Model is set to gpt-4o-mini (cost-effective)\n3. You can change to gpt-4o for higher accuracy\n\n**Required:** Va"
      }
    },
    {
      "id": "370277f5-8a80-4dc8-aff8-f025d6123356",
      "name": "📧 Configure Gmail",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -60
      ],
      "parameters": {
        "width": 340,
        "height": 220,
        "content": "## 📧 CUSTOMIZE THIS NODE\n\n**Gmail Configuration:**\n1. Replace email address with your recipient\n2. Configure Gmail OAuth2 credentials\n3. Customize email subject and message\n\n**Current recipient:** [YO"
      }
    },
    {
      "id": "bccef3f8-801b-421a-8865-00064fc313f2",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        620,
        200
      ]
    },
    {
      "id": "76118dc2-c52d-4a1a-aba2-981a62d4a28a",
      "name": "Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        820,
        360
      ]
    },
    {
      "id": "c34c8c45-fd8e-4cef-8156-6a5658c48c46",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        820,
        540
      ]
    },
    {
      "id": "7bd27f43-9207-40f4-9c6a-bea0be03a6fc",
      "name": "When clicking 'Test workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        180,
        200
      ]
    },
    {
      "id": "c2c21691-fd21-4afe-a60d-08c6399372e5",
      "name": "Select Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        200
      ]
    },
    {
      "id": "4a4b2f78-d043-4853-980d-f24c3f5139dd",
      "name": "Update Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1180,
        520
      ]
    },
    {
      "id": "e8af1018-02ea-4961-be63-4ac7e0b2db4a",
      "name": "Read Data from Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        980,
        180
      ]
    },
    {
      "id": "58cfddb4-cc28-451a-a4ec-f8d391c7b198",
      "name": "Extract Number of Answers per Sentiment",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        180
      ]
    },
    {
      "id": "fa766ee4-8dff-44cd-b2a5-9c2f079ab160",
      "name": "Generate QuickChart",
      "type": "n8n-nodes-base.quickChart",
      "position": [
        1380,
        180
      ]
    },
    {
      "id": "952e3afc-c5a3-4faf-92e1-a467399bc7c8",
      "name": "Send Gmail with Sentiment Chart",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1600,
        180
      ]
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Read Data from Google Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate QuickChart": {
      "main": [
        [
          {
            "node": "Send Gmail with Sentiment Chart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Google Sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Google Sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Data from Google Sheet": {
      "main": [
        [
          {
            "node": "Extract Number of Answers per Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Test workflow'": {
      "main": [
        [
          {
            "node": "Select Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Number of Answers per Sentiment": {
      "main": [
        [
          {
            "node": "Generate QuickChart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}