{
  "name": "ai assistanat analysis feedback - by aixperties",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 5,
              "triggerAtMinute": 15
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -816,
        64
      ],
      "id": "d947826b-3310-4f7d-b0de-77266ac13285",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "formTitle": "reviews",
        "formFields": {
          "values": [
            {
              "fieldLabel": "name",
              "placeholder": "name",
              "requiredField": true
            },
            {
              "fieldLabel": "your review",
              "placeholder": "your feedback about product",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -592,
        64
      ],
      "id": "35f5f663-57ce-4e28-9bdc-a1e325f11b82",
      "name": "On form submission",
      "webhookId": "3019b7ad-4e90-49f1-bd7f-ccf3efd2d91d"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json['your review'] }}",
        "hasOutputParser": true,
        "messages": {
          "messageValues": [
            {
              "message": "You are highly intelligent and accurate sentiment analyzer. Analyze the sentiment of the provided text. Categorize it into one of the following: {Positive, Negative}. Use the provided formatting instructions. Only output the JSON."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        -384,
        64
      ],
      "id": "0ac056be-674d-489b-8ad0-fd4efec7cb17",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        -464,
        272
      ],
      "id": "4f0a55a9-416b-4007-962b-1e088d949dd7",
      "name": "OpenRouter Chat Model"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"state\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        -256,
        272
      ],
      "id": "7ea0eaca-1e02-4817-b2eb-885cd64950bd",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "b76d23c3-0df5-42c5-916d-ac3d64871869",
                    "leftValue": "={{ $json.output.state }}",
                    "rightValue": "Positive",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "positive"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "71b3fd15-0619-4e6e-8b88-0fdf31eba56b",
                    "leftValue": "={{ $json.output.state }}",
                    "rightValue": "Negative",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "negative"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.3,
      "position": [
        -32,
        64
      ],
      "id": "4a6b5e09-f4fb-4ca1-82a9-1bb0b8f9890b",
      "name": "Switch"
    },
    {
      "parameters": {
        "chatId": "622011982",
        "text": "=hi .. see this feedback  {{ $json.output.state }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        144,
        208
      ],
      "id": "8ffd1011-5563-4b98-9a77-6434093ec0d1",
      "name": "Send a text message",
      "webhookId": "5856bb92-4b59-4d1f-b9e8-d173842705cb",
      "credentials": {
        "telegramApi": {
          "id": "yjqXcV0VL4sVaDyg",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C09QAL6Q8F4",
          "mode": "list",
          "cachedResultName": "n8n"
        },
        "text": "=see this  {{ $json.output.state }}",
        "otherOptions": {}
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        144,
        -112
      ],
      "id": "112ba798-9f60-4e6a-bf6e-52dc170e85b2",
      "name": "Send a message",
      "webhookId": "fc3695c8-da4d-443b-97a4-751fccc6c0a3",
      "credentials": {
        "slackOAuth2Api": {
          "id": "14lgcwObdSaNX9zn",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1L5HL-5IWr08CeZGptL4MoQpHddik_LotVc7wBn1D_AA",
          "mode": "list",
          "cachedResultName": "reviews",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L5HL-5IWr08CeZGptL4MoQpHddik_LotVc7wBn1D_AA/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "reviews",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1L5HL-5IWr08CeZGptL4MoQpHddik_LotVc7wBn1D_AA/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $('On form submission').item.json.name }}",
            "reviews": "={{ $('On form submission').item.json['your review'] }}",
            "status": "={{ $json.output.state }}"
          },
          "matchingColumns": [
            "name"
          ],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "reviews",
              "displayName": "reviews",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "status",
              "displayName": "status",
              "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": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        320,
        80
      ],
      "id": "8c1452b2-68f2-4151-beb7-a6682701a9dc",
      "name": "Append or update row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "BQGnmVXetQ1tD6mQ",
          "name": "Google Sheets account 2"
        }
      }
    },
    {
      "parameters": {
        "content": "## Developed and Design By aixperties.com ",
        "height": 80,
        "width": 336,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -832,
        256
      ],
      "id": "43a455a2-5be9-497f-a4e9-17f04a0b3311",
      "name": "Sticky Note"
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "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
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [],
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "4fd6828d-b236-46b0-8fdd-09e69f8cb8fd",
  "meta": {
    "instanceId": "e4a3f167fa24fd0d26a261aee1040ab9b28f172ecfd8749186d5fb541ee7b6b8"
  },
  "id": "XvJwbmmlIHVEpTUNAs_ro",
  "tags": []
}