{
  "name": "Summarize feedbacks",
  "nodes": [
    {
      "parameters": {},
      "id": "f2a46d88-3f0c-466b-b095-c8c30cdb09d2",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -64,
        48
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "REDACTED_GOOGLE_SHEET_ID",
          "mode": "list",
          "cachedResultName": "demo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/REDACTED_GOOGLE_SHEET_ID/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/REDACTED_GOOGLE_SHEET_ID/edit#gid=0"
        },
        "options": {}
      },
      "id": "fdba3bb2-8f2f-4397-b06f-01397424d336",
      "name": "Get Google Sheets records",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        192,
        48
      ],
      "typeVersion": 4.2,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "['What went great?']"
            },
            {
              "fieldToAggregate": "['How can we improve?']"
            },
            {
              "fieldToAggregate": "['What is the chance of recommending our event?']"
            }
          ]
        },
        "options": {}
      },
      "id": "12259781-daa2-4020-93ee-a84225cf5aee",
      "name": "Aggregate responses into arrays",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        480,
        48
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "resource": "chat",
        "chatModel": "gpt-4o-mini",
        "prompt": {
          "messages": [
            {
              "role": "system",
              "content": "Your task is to summarize event feedback form responses. You will receive answers on three questions:\n1. What went great?\n2. How can we improve?\n3. What is the chance of recommending our event?\n\nEach questions has several answers separated by | character.\nAnalyze each question and prepare a summary report. It should contain an overall sentiment regarding the event, followed by the constructive ideas of what to improve.\n\nReply in Markdown formatting"
            },
            {
              "content": "=1. What went great: ```{{ $json['What went great?'].join(' | ') }}```\n2. How can we improve: ```{{ $json['How can we improve?'].join(' | ') }}```\n3. What is the chance of recommending our event: ```{{ $json['What is the chance of recommending our event?'].join(' | ') }}```"
            }
          ]
        },
        "options": {
          "temperature": 0.3
        },
        "requestOptions": {}
      },
      "id": "e1eb184d-d3bf-4e70-b8f0-534aaeefce98",
      "name": "Summarize via GPT model",
      "type": "n8n-nodes-base.openAi",
      "position": [
        752,
        48
      ],
      "typeVersion": 1.1,
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "markdownToHtml",
        "markdown": "={{ $json.message.content }}",
        "options": {
          "completeHTMLDocument": false
        }
      },
      "id": "23f1db33-73c4-4973-8fb5-559966c74510",
      "name": "Convet from Markdown to HTML",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1072,
        48
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "sendTo": "REDACTED_EMAIL@example.com",
        "subject": "Feedback form response",
        "message": "={{ $json.data }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "26771b74-5079-4bc0-b3b0-506d603cd515",
      "name": "Send via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1376,
        48
      ],
      "typeVersion": 2.1,
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Get Google Sheets records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google Sheets records": {
      "main": [
        [
          {
            "node": "Aggregate responses into arrays",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate responses into arrays": {
      "main": [
        [
          {
            "node": "Summarize via GPT model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize via GPT model": {
      "main": [
        [
          {
            "node": "Convet from Markdown to HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convet from Markdown to HTML": {
      "main": [
        [
          {
            "node": "Send via Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "c177c136-a43d-4c02-8310-2cf0c4d36d09",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "REDACTED_CREDENTIAL_ID",
  "tags": []
}