{
  "name": "Customer Feedback Sentiment Analysis",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI",
          "mode": "list",
          "cachedResultName": "Customer Feedback",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 70574972,
          "mode": "list",
          "cachedResultName": "Form Responses 3",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI/edit#gid=70574972"
        },
        "event": "rowAdded",
        "options": {}
      },
      "id": "680728fd-ed7d-4cf1-b0f1-6310902a7772",
      "name": "Google Sheet Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        -80,
        80
      ],
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "eabsuHEHYGUrXq0K",
          "name": "Suresh.Google Sheets Trigger account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI",
          "mode": "list",
          "cachedResultName": "Customer Feedback",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 70574972,
          "mode": "list",
          "cachedResultName": "Form Responses 3",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SteLTI7BsgS8f3XcOIS6m7VJrsqdfMsHDsk0G5F_SdI/edit#gid=70574972"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $('Google Sheet Trigger').item.json.Email }}",
            "Sentiment": "={{ $json.message.content }}"
          },
          "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": "feedback",
              "displayName": "feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Sentiment",
              "displayName": "Sentiment",
              "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": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        480,
        80
      ],
      "id": "bf72db12-254e-4468-ac86-139a07df0474",
      "name": "Update Sentiment",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cOspDa8h1hkwDLvX",
          "name": "Suresh.Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "=You are a helpful AI assistant. A user submitted the following feedback: \"{{ $json.feedback }}\". Please analyze the sentiment of this feedback and tell me in one word it is positive, netural or nagative."
            }
          ]
        },
        "options": {}
      },
      "id": "55277d78-865d-4a93-a6eb-34d1794d3cf7",
      "name": "Sentiment Analysis from OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        120,
        80
      ],
      "credentials": {
        "openAiApi": {
          "id": "ga54eHkT3k6225Zq",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Google Sheet Trigger": {
      "main": [
        [
          {
            "node": "Sentiment Analysis from OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis from OpenAI": {
      "main": [
        [
          {
            "node": "Update Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bdac17d9-7db1-4816-a462-a751e850ff27",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "fcb622cbd5234c565b9b78babeaf0ea2455df9d2aad0d1adff7c1ef99583e685"
  },
  "id": "RkoCHO2Mc9LOfoGY"
}