{
  "name": "Retail Feedback Sentiment & Thank-You Emails",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Review Matter",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Guest Name"
            },
            {
              "fieldLabel": "Email"
            },
            {
              "fieldLabel": "How would you rate your overall shopping experience with us?",
              "fieldType": "radio",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              }
            },
            {
              "fieldLabel": "What stood out to you about your shopping experience?"
            },
            {
              "fieldLabel": "How would you rate the quality of the products you purchased? (1–5)",
              "fieldType": "radio",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              }
            },
            {
              "fieldLabel": "Please share your thoughts on product quality or improvements."
            },
            {
              "fieldLabel": "How satisfied are you with our discounts, promotions, and offers?",
              "fieldType": "radio",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              }
            },
            {
              "fieldLabel": "What kind of offers would you like to see more often?"
            },
            {
              "fieldLabel": "How do you rate our pricing compared to product quality? (1–5)",
              "fieldType": "radio",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              }
            },
            {
              "fieldLabel": "Do you feel the products provide good value for money?"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        752,
        448
      ],
      "id": "2ccdaa9e-f764-4474-b985-69cfb308e2e8",
      "name": "On form submission",
      "webhookId": "785950a4-1fb5-4769-a8b3-d1c678a0fb6b"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1G9XeeFUg5lNRLev56kpRPMDOWWmbRuwMf9lR8-QLap0",
          "mode": "list",
          "cachedResultName": "Retail  - Customer Feedback Analysis"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Guest Name": "={{ $json['Guest Name'] }}",
            "Email": "={{ $json.Email }}",
            "Overall shopping Rate": "={{ $json['How would you rate your overall shopping experience with us?'] }}",
            "Quality rate": "={{ $json['How would you rate the quality of the products you purchased? (1–5)'] }}",
            "Products As money Rate": "={{ $json['How do you rate our pricing compared to product quality? (1–5)'] }}",
            "Discounts Rate": "={{ $json['How satisfied are you with our discounts, promotions, and offers?'] }}",
            "Overall shopping  Feedback": "={{ $json['What stood out to you about your shopping experience?'] }}",
            "Quality Feedback": "={{ $json['Please share your thoughts on product quality or improvements.'] }}",
            "Discounts Feedback": "={{ $json['What kind of offers would you like to see more often?'] }}",
            "Products As money Feedback": "={{ $json['Do you feel the products provide good value for money?'] }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Guest Name",
              "displayName": "Guest Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Overall shopping Rate",
              "displayName": "Overall shopping Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Quality rate",
              "displayName": "Quality rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Discounts Rate",
              "displayName": "Discounts Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Products As money Rate",
              "displayName": "Products As money Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Overall shopping  Feedback",
              "displayName": "Overall shopping  Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Quality Feedback",
              "displayName": "Quality Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Discounts Feedback",
              "displayName": "Discounts Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Products As money Feedback",
              "displayName": "Products As money Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Overall shopping Sentiment",
              "displayName": "Overall shopping Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Quality Sentiment",
              "displayName": "Quality Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Discounts Sentiment",
              "displayName": "Discounts Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Products As money Sentiment",
              "displayName": "Products As money Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        976,
        448
      ],
      "id": "3de7a5ab-9191-485e-bbad-bf78ab747d74",
      "name": "Review Log",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "9rJzpmHDDKlqEEe9",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "content": "## Data Setup\nCreate your own spreadsheet with these tabs/columns, then select it in the Google Sheets nodes:\n- **Retail  - Customer Feedback Analysis → Sheet1**: `Guest Name`, `Email`, `Overall shopping Rate`, `Quality rate`, `Discounts Rate`, `Products As money Rate`, `Overall shopping  Feedback`, `Quality Feedback`, `Discounts Feedback`, `Products As money Feedback`, `Overall shopping Sentiment`, `Quality Sentiment`, `Discounts Sentiment`, `Products As money Sentiment`",
        "height": 96,
        "width": 416
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        320
      ],
      "typeVersion": 1,
      "id": "65753257-8d1d-4e2f-ba03-20e7b1206e52",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a sentiment analysis assistant.  \nAnalyze the following guest feedback with their ratings and text.  \nFor each category, return only the sentiment (Positive, Neutral, Negative).  \n\nGuest Feedback Data:  \n- Guest Name: {{ $json['Guest Name'] }}\n- Email: {{ $json.Email }}\n- overall shopping Rate: {{ $json[' overall shopping Rate'] }}\n- quality rate:{{ $json['quality rate'] }}\n- discounts Rate: {{ $json['discounts Rate'] }}\n- products As money Rate: {{ $json['products As money Rate'] }}\n- overall shopping  Feedback: {{ $json[' overall shopping  Feedback'] }}\n- quality Feedback: {{ $json['quality Feedback'] }}\n- discounts Feedback: {{ $json['discounts Feedback'] }}\n- pricing compared to product quality: {{ $json['products As money Feedback'] }}\nReturn result in JSON format with only these fields:  \n{\n  \"overall shopping Sentiment\": \"\",\n  \"quality Sentiment\": \"\",\n  \"discounts Sentiment\": \"\",\n  \"products As money Sentiment\": \"\"\n}\n\nAlso, at the end, provide the **average sentiment** across all categories.\n",
        "hasOutputParser": true,
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        1168,
        448
      ],
      "id": "aa11ffb0-0b9b-4b29-b748-b0ca42883e0e",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "model": "deepseek/deepseek-chat-v3.1:free",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        1168,
        656
      ],
      "id": "92badea9-1169-4f3b-9748-b45219977b42",
      "name": "OpenRouter Chat Model",
      "credentials": {
        "openRouterApi": {
          "id": "DwdgmyDtoGz2QcjT",
          "name": "OpenRouter account"
        }
      }
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"overall shopping Sentiment\": \"\",\n  \"quality Sentiment\": \"\",\n  \"discounts Sentiment\": \"\",\n  \"products As money Sentiment\": \"\"\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        1312,
        656
      ],
      "id": "8a25cf28-6675-40d2-adb3-2921caace87f",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email }}",
        "subject": "Thank You for Your Feedback! 🌟",
        "emailType": "text",
        "message": "=Dear {{ $('On form submission').item.json['Guest Name'] }},  \n\nThank you for sharing your shopping experience with us! 🛍️✨\nYour feedback helps us improve and ensures we continue to bring you the best products and service. 💛\n\nWe’re delighted to have you as our valued customer and look forward to serving you again soon! 🙌\n\nWarm regards,  \nDara Team 💛\n",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1584,
        368
      ],
      "id": "5e610ab2-40ad-4e71-887b-59d69af3acdd",
      "name": "Send User To Feedback Email",
      "webhookId": "ffaeec43-7da9-4502-a274-849c666c6e7e",
      "credentials": {
        "gmailOAuth2": {
          "id": "LBIbVskaBzVhN0SE",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1G9XeeFUg5lNRLev56kpRPMDOWWmbRuwMf9lR8-QLap0",
          "mode": "list",
          "cachedResultName": "Retail  - Customer Feedback Analysis"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $('Review Log').item.json.Email }}",
            "Overall shopping Sentiment": "={{ $json.output['overall shopping Sentiment'] }}",
            "Quality Sentiment": "={{ $json.output['quality Sentiment'] }}",
            "Discounts Sentiment": "={{ $json.output['discounts Sentiment'] }}",
            "Products As money Sentiment": "={{ $json.output['products As money Sentiment'] }}"
          },
          "matchingColumns": [
            "Email"
          ],
          "schema": [
            {
              "id": "Guest Name",
              "displayName": "Guest 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": "Overall shopping Rate",
              "displayName": "Overall shopping Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Quality rate",
              "displayName": "Quality rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Discounts Rate",
              "displayName": "Discounts Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Products As money Rate",
              "displayName": "Products As money Rate",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Overall shopping  Feedback",
              "displayName": "Overall shopping  Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Quality Feedback",
              "displayName": "Quality Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Discounts Feedback",
              "displayName": "Discounts Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Products As money Feedback",
              "displayName": "Products As money Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Overall shopping Sentiment",
              "displayName": "Overall shopping Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Quality Sentiment",
              "displayName": "Quality Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Discounts Sentiment",
              "displayName": "Discounts Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Products As money Sentiment",
              "displayName": "Products As money Sentiment",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1568,
        592
      ],
      "id": "888da12f-f1c8-4d9a-99df-04696b98a71b",
      "name": "Append Sentiment in Sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "9rJzpmHDDKlqEEe9",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Review Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Review Log": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Send User To Feedback Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append Sentiment in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "174b5a83-1066-43ca-9e20-102693d5648c",
  "meta": {
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "3idraOlccKDVDpMW",
  "tags": []
}