AutomationFlowsEmail & Gmail › Analyze Form Feedback Sentiment with OpenAI

Analyze Form Feedback Sentiment with OpenAI

Original n8n title: Customer Feedback Sentiment Analysis

Customer Feedback Sentiment Analysis. Uses formTrigger, sentimentAnalysis, lmChatOpenAi, googleSheets. Event-driven trigger; 10 nodes.

Event trigger★★★★☆ complexityAI-powered10 nodesForm TriggerSentiment AnalysisOpenAI ChatGoogle SheetsChain LlmGmail
Email & Gmail Trigger: Event Nodes: 10 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Chainllm → Form Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Customer Feedback Sentiment Analysis",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Customer Feedback",
        "formDescription": "We value your feedback! Let us know about your experience and what we can improve",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Name",
              "placeholder": "Please enter your name...",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "fieldType": "email",
              "placeholder": "Please enter your email...",
              "requiredField": true
            },
            {
              "fieldLabel": "Feedback",
              "fieldType": "textarea",
              "placeholder": "Please describe your experience...",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -192,
        -144
      ],
      "id": "36ce4a3f-648e-4b1f-b7e6-0468eeee3460",
      "name": "On form submission"
    },
    {
      "parameters": {
        "inputText": "={{ $json.Feedback }}",
        "options": {
          "categories": "Positive, Negative"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "typeVersion": 1.1,
      "position": [
        16,
        -144
      ],
      "id": "1f28c080-09f9-4698-bffc-663584223b37",
      "name": "Sentiment Analysis"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        272,
        256
      ],
      "id": "70dd6404-2928-4068-8521-521a8c941003",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE",
          "mode": "list",
          "cachedResultName": "Customer Feedback Form Demo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Positive",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $('On form submission').item.json.Email }}",
            "Name": "={{ $('On form submission').item.json.Name }}",
            "Feedback": "={{ $('On form submission').item.json.Feedback }}"
          },
          "matchingColumns": [
            "Email"
          ],
          "schema": [
            {
              "id": "Name",
              "displayName": "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,
              "removed": false
            },
            {
              "id": "Feedback",
              "displayName": "Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        368,
        -240
      ],
      "id": "a8fa10c0-27cc-4f33-b4f6-9c430d098d8e",
      "name": "Add Positive Feedback",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a customer support representative for an AI Automation Agency known as AdaptifyAI specialized in helping SME implement AI Agents and AI Automation solutions.\n\nWrite a friendly response to the customer feedback beloe. Format as HTML email and sign from Marc at AdaptifyAI. Return only HTML code, do not include ```html\n\nCustomer Name:\n\n {{ $('On form submission').item.json.Name }}\n\nFeedback:\n\n{{ $('On form submission').item.json.Feedback }}",
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        576,
        -240
      ],
      "id": "a7e795e0-0cec-48ca-a0af-e758c7ae9619",
      "name": "Write Positive Response"
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email }}",
        "subject": "Thank you for your valuable feedback",
        "message": "={{ $json.text }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        928,
        -240
      ],
      "id": "b8430180-cb96-4c68-94d7-460e7a8b1052",
      "name": "Send response to positive feedback",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a customer support representative for an AI Automation Agency known as AdaptifyAI specialized in helping SME implement AI Agents and AI Automation solutions.\n\nA client jst submitted feedback about our services which you can see below.\n\nPlease provide a concise suggestion on what AdaptifyAI cando to address their concerns and improve client  satisfaction in the future\n\n\n\nFeedback:\n\n{{ $('On form submission').item.json.Feedback }}",
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        560,
        0
      ],
      "id": "a8f64165-1a76-419d-a479-1fd094862c51",
      "name": "Suggests Improvements"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE",
          "mode": "list",
          "cachedResultName": "Customer Feedback Form Demo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 851926337,
          "mode": "list",
          "cachedResultName": "Negative",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1V7y3DpfmfmtxHLQafi3jPgqyCrWkt3zI-87eAAXR4LE/edit#gid=851926337"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $('On form submission').item.json.Email }}",
            "Name": "={{ $('On form submission').item.json.Name }}",
            "Feedback": "={{ $('On form submission').item.json.Feedback }}",
            "AI Suggestion": "={{ $json.text }}"
          },
          "matchingColumns": [
            "Email"
          ],
          "schema": [
            {
              "id": "Name",
              "displayName": "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,
              "removed": false
            },
            {
              "id": "Feedback",
              "displayName": "Feedback",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "AI Suggestion",
              "displayName": "AI Suggestion",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        912,
        0
      ],
      "id": "422c31f9-66ec-419d-9e60-6923553bc7be",
      "name": "Add Negative Feedback",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a customer support representative for an AI Automation Agency known as AdaptifyAI specialized in helping SME implement AI Agents and AI Automation solutions.\n\nWrite a friendly  and concise response to the followin customer feedback. \n\nThe email should thank the client for their feedback about the services, acknowledge thei concerns, and inform that this has been escalated to our management . Offer to extend their current autmaton package with one additional AI Agent integration at no extra charge.\n\n\nFormat as HTML email and sign from Marc at AdaptifyAI. Return only HTML code, do not include ```html\n\nCustomer Name:\n\n {{ $('On form submission').item.json.Name }}\n\nFeedback:\n\n{{ $('On form submission').item.json.Feedback }}",
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        1184,
        0
      ],
      "id": "94e3e89f-db88-4dfc-9e2a-5d431a611cbd",
      "name": "Write Apology Email"
    },
    {
      "parameters": {
        "sendTo": "={{ $('On form submission').item.json.Email }}",
        "subject": "We're sorry here's how we'll fih this ",
        "message": "={{ $json.text }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1536,
        0
      ],
      "id": "0302ad31-a285-44dc-92cc-504405ed8813",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Write Positive Response",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Suggests Improvements",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Write Apology Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Add Positive Feedback",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Suggests Improvements",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Positive Feedback": {
      "main": [
        [
          {
            "node": "Write Positive Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Positive Response": {
      "main": [
        [
          {
            "node": "Send response to positive feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Suggests Improvements": {
      "main": [
        [
          {
            "node": "Add Negative Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Negative Feedback": {
      "main": [
        [
          {
            "node": "Write Apology Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Apology Email": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b554e8f2-972e-48d9-b195-af05cdccc144",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "eIN6pClRolSJpXOb",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

Automatically analyse customer feedback sentiment to prioritise responses and drive improvements, saving time on manual reviews while uncovering actionable insights from comments. Ideal for customer support teams or product managers handling regular surveys or forms, this workflow processes submissions via formTrigger and uses sentimentAnalysis to classify positivity or negativity. The key step involves OpenAI's chat model generating tailored replies or suggestions, with results logged in Google Sheets for easy tracking.

Use this when feedback volume is moderate and you need quick, AI-powered categorisation to respond personally via Gmail, such as post-purchase surveys. Avoid it for very high-volume inputs requiring custom training or non-text data like audio. Common variations include swapping Google Sheets for Airtable storage or adding Slack notifications for urgent negative sentiment.

About this workflow

Customer Feedback Sentiment Analysis. Uses formTrigger, sentimentAnalysis, lmChatOpenAi, googleSheets. Event-driven trigger; 10 nodes.

Source: https://github.com/Khuzaima-AI-2112/n8n-automation-templates/blob/master/01_Bussiness-&-Support/03_customer-support-feedback-automation/Customer+Feedback+Sentiment+Analysis.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

n8n Graphic Design Team. Uses googleSheets, googleDrive, httpRequest, outputParserStructured. Event-driven trigger; 37 nodes.

Google Sheets, Google Drive, HTTP Request +5
Email & Gmail

Wait Filter. Uses stickyNote, httpRequest, formTrigger, chainLlm. Event-driven trigger; 18 nodes.

HTTP Request, Form Trigger, Chain Llm +3
Email & Gmail

Wait Http. Uses stickyNote, httpRequest, lmChatOpenAi, googleSheets. Event-driven trigger; 17 nodes.

HTTP Request, OpenAI Chat, Google Sheets +4
Email & Gmail

🎦💌Advanced YouTube RSS Feed Buddy for Your Favorite Channels. Uses formTrigger, httpRequest, stickyNote, lmChatOpenAi. Event-driven trigger; 41 nodes.

Form Trigger, HTTP Request, OpenAI Chat +4
Email & Gmail

Qualifying Appointment Requests With Ai & N8N Forms. Uses formTrigger, form, lmChatOpenAi, gmail. Event-driven trigger; 25 nodes.

Form Trigger, Form, OpenAI Chat +5