{
  "id": "XTKHeFxaQc8uwnYF",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Extract Marketing Insights from Google Reviews Using Dumpling AI + GPT-4",
  "tags": [],
  "nodes": [
    {
      "id": "9f6e53f7-12ae-45a7-b816-617197acd352",
      "name": "\ud83e\udde0 LangChain Tools (for Agents)",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        760,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c7534580-3472-489c-85b1-db05121151e8",
      "name": "Submit Business Name + Place ID",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -200,
        -40
      ],
      "parameters": {
        "options": {},
        "formTitle": "Google Review",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Business name"
            },
            {
              "fieldLabel": "Place ID"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "aff38b94-5fc0-4478-b021-17e6c185ae82",
      "name": "\ud83d\udd0e Dumpling AI: Fetch Google Reviews",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        20,
        -40
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/get-google-reviews",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"placeId\": \"{{ $json['Place ID'] }}\",\n  \"reviews\": \"30\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9a5760c1-3562-4e9c-b917-f54a6a615c03",
      "name": "\ud83e\uddee Split: Each Review",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        240,
        -40
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "items"
      },
      "typeVersion": 1
    },
    {
      "id": "7af16680-62b4-4da2-a436-c0e2adf63d2c",
      "name": "\ud83d\udce6 Aggregate: Merge All Review Texts",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        460,
        -40
      ],
      "parameters": {
        "include": "specifiedFields",
        "options": {},
        "aggregate": "aggregateAllItemData",
        "fieldsToInclude": "review_text"
      },
      "typeVersion": 1
    },
    {
      "id": "393d9910-756d-4905-bf7b-ee97b68c9246",
      "name": "\ud83e\udd16 GPT-4: Extract Marketing Insights",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        712,
        -40
      ],
      "parameters": {
        "text": "=I want you to analyze the following Google reviews and return insights specifically for marketing and product strategy.\n\nYour deliverables should include:\n\nMarketing Angles \u2013 what messaging themes or emotional triggers can we use in ads and content?\n\nCustomer Motivations \u2013 why are people really buying this product? What are they trying to solve or feel?\n\nFrictions & Barriers \u2013 what hesitations, annoyances, or pain points are common?\n\nProduct Opportunities \u2013 what could we improve or add to make the product 10x better?\n\nVoice of Customer (VOC) Snippets \u2013 include 3-5 powerful review quotes we can reuse in copy.\n\nReview Data:{{ JSON.stringify($json.data) }}\n\n",
        "options": {
          "systemMessage": "You are a Senior Marketing Strategist AI.\n\nYour task is to analyze customer reviews as data for extracting actionable marketing intelligence.\n\nInput: A batch of Google reviews\nOutput: Clear and structured marketing insights\n\nAlways prioritize insights that can influence messaging, guide product iterations, or unlock new customer segments."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "a954bb5b-c4c3-4120-8bc1-91842c16c33a",
      "name": "\ud83d\udd0c GPT-4 Model (used in Agent)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        180
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6556131b-1442-49cc-9873-c3777b9a6460",
      "name": "\ud83d\udcca Parse: Format Insights for Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1000,
        200
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"marketingAngles\": [\n    \"string\"\n  ],\n  \"customerMotivations\": [\n    \"string\"\n  ],\n  \"frictionsAndBarriers\": [\n    \"string\"\n  ],\n  \"productOpportunities\": [\n    \"string\"\n  ],\n  \"voiceOfCustomerSnippets\": [\n    \"string\"\n  ]\n}\n"
      },
      "typeVersion": 1.2
    },
    {
      "id": "814b9889-ea33-44ed-82b9-83a6733a1486",
      "name": "\ud83d\udcc4 Google Sheets: Save Insights",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        -40
      ],
      "parameters": {
        "columns": {
          "value": {
            "Place ID": "={{ $('Submit Business Name + Place ID').item.json['Place ID'] }}",
            "Business Name": "={{ $('Submit Business Name + Place ID').item.json['Business name'] }}",
            "marketing Angles": "={{ $json.output.MarketingInsights.MarketingAngles.join('\\n\\n') }}\n",
            "customer Motivations": "={{ $json.output.MarketingInsights.CustomerMotivations.join('\\n\\n') }}",
            "product Opportunities": "={{ $json.output.MarketingInsights.ProductOpportunities.join('\\n\\n') }}",
            "frictions And Barriers": "={{ $json.output.MarketingInsights.FrictionsAndBarriers.join('\\n\\n') }}",
            "voice Of Customer Snippets": "={{ $json.output.VoiceOfCustomerSnippets.join('\\n\\n') }}"
          },
          "schema": [
            {
              "id": "Business Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Business Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Place ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Place ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "marketing Angles",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "marketing Angles",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "customer Motivations",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "customer Motivations",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "frictions And Barriers",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "frictions And Barriers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "product Opportunities",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "product Opportunities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "voice Of Customer Snippets",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "voice Of Customer Snippets",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Place ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XAYbVfYm-lIGDEejvtXoa9XozAXCiAnr1qYFnkdvkdc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XAYbVfYm-lIGDEejvtXoa9XozAXCiAnr1qYFnkdvkdc/edit?usp=drivesdk",
          "cachedResultName": "Marketing Insights"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e9afa934-7b59-4928-a18e-4f8a869018f3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -480
      ],
      "parameters": {
        "width": 980,
        "height": 440,
        "content": "### \ud83d\udcca Google Review \u2192 Marketing Insight Extractor\n\nThis workflow lets you input a business name and Google Place ID, then automatically:\n\n1. Fetches the top 30 reviews using Dumpling AI  \n2. Aggregates the full review text  \n3. Analyzes the content using GPT-4 + LangChain Agent  \n4. Extracts:\n   - Marketing angles  \n   - Customer motivations  \n   - Frictions/barriers  \n   - Product opportunities  \n   - VOC (voice of customer) quotes  \n5. Logs the insights to a Google Sheet for further use\n\n\ud83d\udee0 Tools Used:\n- Dumpling AI (Review fetching)\n- GPT-4 via LangChain Agent (Insight extraction)\n- Google Sheets (Output storage)\n\n\u2705 Great for marketers, product teams, and brand strategists doing VOC analysis.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "16928bd1-b2f7-4167-992f-1f47271d1381",
  "connections": {
    "\ud83e\uddee Split: Each Review": {
      "main": [
        [
          {
            "node": "\ud83d\udce6 Aggregate: Merge All Review Texts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Business Name + Place ID": {
      "main": [
        [
          {
            "node": "\ud83d\udd0e Dumpling AI: Fetch Google Reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd0c GPT-4 Model (used in Agent)": {
      "ai_languageModel": [
        [
          {
            "node": "\ud83e\udd16 GPT-4: Extract Marketing Insights",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udde0 LangChain Tools (for Agents)": {
      "ai_tool": [
        [
          {
            "node": "\ud83e\udd16 GPT-4: Extract Marketing Insights",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcca Parse: Format Insights for Output": {
      "ai_outputParser": [
        [
          {
            "node": "\ud83e\udd16 GPT-4: Extract Marketing Insights",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce6 Aggregate: Merge All Review Texts": {
      "main": [
        [
          {
            "node": "\ud83e\udd16 GPT-4: Extract Marketing Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd0e Dumpling AI: Fetch Google Reviews": {
      "main": [
        [
          {
            "node": "\ud83e\uddee Split: Each Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udd16 GPT-4: Extract Marketing Insights": {
      "main": [
        [
          {
            "node": "\ud83d\udcc4 Google Sheets: Save Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}