{
  "name": "Analyze & Tag User Feedback in Notion with GPT-4 Sentiment Analysis",
  "nodes": [
    {
      "id": "d4f8359b-c80b-409c-a5e3-0c4a2b1868ae",
      "name": "update feedback sentiment analysis",
      "type": "n8n-nodes-base.notion",
      "position": [
        1664,
        -224
      ]
    },
    {
      "id": "76fd1d49-3c0e-4f82-a362-e9e934fb4603",
      "name": "Get database structure",
      "type": "n8n-nodes-base.notion",
      "position": [
        1648,
        448
      ]
    },
    {
      "id": "cdea1403-bb1f-498e-bed7-999f5a32ac67",
      "name": "Get all feedback",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        3360,
        608
      ]
    },
    {
      "id": "c0c95739-45b9-4947-b214-0d238b51c33b",
      "name": "Get all insights",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        3184,
        608
      ]
    },
    {
      "id": "90241f39-a8af-4675-a57a-f1391f9b513c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3984,
        768
      ]
    },
    {
      "id": "f93b5559-8eb5-4216-95b8-82e061a71b24",
      "name": "Sentiment Analysis1",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        1248,
        -224
      ]
    },
    {
      "id": "33b9c804-4f4b-44ae-8238-2bdb5e859665",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        3808,
        624
      ]
    },
    {
      "id": "8a306667-f028-48fc-a3a3-44bf33d79cad",
      "name": "Create New Insight",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        3520,
        608
      ]
    },
    {
      "id": "2146f34b-9f59-404e-b70d-f8e22b7f49b0",
      "name": "Window Buffer Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2864,
        608
      ]
    },
    {
      "id": "87c6d9a6-58d7-4a58-b1da-3ee37ab58e3e",
      "name": "Update Feedback",
      "type": "n8n-nodes-base.notion",
      "position": [
        3872,
        160
      ]
    },
    {
      "id": "965d9764-2916-4bc5-bc46-37d242871173",
      "name": "on database item update",
      "type": "n8n-nodes-base.notionTrigger",
      "position": [
        928,
        144
      ]
    },
    {
      "id": "2d691c3b-92c9-4f70-b51c-cfb11455b52e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2432,
        160
      ]
    },
    {
      "id": "9a0475cd-906a-4bdc-a9db-167dabc1916a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        32
      ],
      "parameters": {
        "width": null,
        "height": 300,
        "content": "### Trigger\nSet it to use the Database containing the User Feedback\n"
      }
    },
    {
      "id": "49d3e282-b43a-435f-b04f-663680383f09",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        -336
      ],
      "parameters": {
        "width": 680,
        "height": 420,
        "content": "### Make A Sentiment Analysis\nThis part of the workflow runs a sentiment analysis for each new/up[dated feedback and set it in Notion\n"
      }
    },
    {
      "id": "ec11349c-fc60-41f1-baa7-01ab6c25ddc8",
      "name": "OpenAI - Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1344,
        -80
      ]
    },
    {
      "id": "3d3051dc-c141-4917-a7a4-25d6bb9d8065",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        240
      ],
      "parameters": {
        "width": 320,
        "height": 380,
        "content": "### Configure your product information\nIn this node, you will define your product:\n- `Product Overview`: text\n- `Core Features`: a comma-separated list of product features that define your product"
      }
    },
    {
      "id": "cda892d3-d588-418d-85ac-d266bf91592b",
      "name": "Set the Product information",
      "type": "n8n-nodes-base.set",
      "position": [
        1312,
        448
      ]
    },
    {
      "id": "c7a2465f-4062-49e7-9dd3-70768d7f00d4",
      "name": "Set Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        2128,
        448
      ]
    },
    {
      "id": "a6ed81c9-b6d8-4777-b6bb-c27c91becb0d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        240
      ],
      "parameters": {
        "width": 400,
        "height": 380,
        "content": "### Get your insights solutions and user persona\n- These nodes get live data from your Notion `Insight` Database and format them in a right way.\n- Set it to use your the database containing your Insig"
      }
    },
    {
      "id": "616e34d9-2c57-4942-befc-4ee2b585934e",
      "name": "Clean the database propertied",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        448
      ]
    },
    {
      "id": "158439de-221a-492e-adc3-746cb2201321",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        240
      ],
      "parameters": {
        "width": 300,
        "height": 380,
        "content": "### Set the AI Agent Prompt\nThis node contains the prompt for the main AI Agent.\nYou shouldn't have to modify it."
      }
    },
    {
      "id": "9a0f41b8-9fc3-4a79-9d65-1e7032a28574",
      "name": "OpenAI - AI Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2544,
        608
      ]
    },
    {
      "id": "356ed301-f92d-4e0e-a07b-1e56ce0b7af1",
      "name": "OpenAI - Parser fixing",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3840,
        768
      ]
    },
    {
      "id": "6e16a3c3-5453-4e75-9742-8a2f1efb92a0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2448,
        400
      ],
      "parameters": {
        "width": 300,
        "height": 380,
        "content": "### Chat model\nUse GPT 4o to orchestrate Node as Tools, decide when to create insights and write them properly.\nAdjust temperature as needed.\n"
      }
    },
    {
      "id": "8ef22961-fcef-4f48-9e27-36caefe91ce6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2768,
        400
      ],
      "parameters": {
        "width": 300,
        "height": 380,
        "content": "### Memory\nThis is the basic n8n Memory. We recommend using an alternative memory such as Postgres (easy to do with [Supabase](https://supabase.com/))"
      }
    },
    {
      "id": "61144e4d-9c4e-41cb-98ef-aecefc5dd721",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3088,
        400
      ],
      "parameters": {
        "width": 609.5205857836678,
        "height": 380,
        "content": "### Node as tools\nThese nodes as tools are all connected to your Notion account and Databases: Feedback and Insights. \nThey enable the agent to get all existing insights, existing feedback and let the"
      }
    },
    {
      "id": "68d38fd5-6aa5-4e4d-8019-d43767d4e03b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2880,
        -32
      ],
      "parameters": {
        "width": 466.6446274279343,
        "height": 375.53222703726067,
        "content": "### Agent\nThe agent is the main component of this workflow.\nIt receives all the information from the previous nodes about the new feedback received and the options of the Insight Database.\nThe agent m"
      }
    },
    {
      "id": "c24f6d6f-4291-4a25-a874-8ae676db104e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3744,
        400
      ],
      "parameters": {
        "width": 381,
        "height": 521,
        "content": "### Fixing parser\nThese nodes fix occasionally the output from the Agent. In some cases, the output was erroneous and the feedback couldn't be updated.\nIf you see that it's not required anymore, you c"
      }
    },
    {
      "id": "cb5af46d-2dc2-409f-bff3-56e16beb6cb2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2944,
        160
      ]
    },
    {
      "id": "321d155f-b2a2-4073-83d7-3893b3f52a12",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3744,
        -48
      ],
      "parameters": {
        "width": 370.5875087290284,
        "height": 380,
        "content": "### Update feedback\nThis node updates the feedback Database based on the Agent recommendation."
      }
    },
    {
      "id": "e7c6de3b-3787-449f-be67-f2bd3ab07412",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -368
      ],
      "parameters": {
        "width": 840,
        "height": 1360,
        "content": "## Automatically Analyze and Tag User Feedback in Notion\n\n## Overview\n- This n8n workflow processes user feedback automatically, tags it with sentiment, and links it to relevant insights in Notion.\n- "
      }
    },
    {
      "id": "7f457c8d-3183-44c4-894c-49dca3280f16",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -704
      ],
      "parameters": {
        "width": 400,
        "height": 300,
        "content": "## Attribution\n![Agent Studio](https://agentstudio.io/images/agent_studio_logo_small.png)\nThis template was created by [Agent Studio](https://agentstudio.io/) and is available on [n8n](https://n8n.io/"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Update Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Prompt": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get all feedback": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get all insights": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - AI Agent": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create New Insight": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis1": {
      "main": [
        [
          {
            "node": "update feedback sentiment analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "update feedback sentiment analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "update feedback sentiment analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get database structure": {
      "main": [
        [
          {
            "node": "Clean the database propertied",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Parser fixing": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "on database item update": {
      "main": [
        [
          {
            "node": "Sentiment Analysis1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set the Product information",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Sentiment Analysis": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set the Product information": {
      "main": [
        [
          {
            "node": "Get database structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean the database propertied": {
      "main": [
        [
          {
            "node": "Set Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}