{
  "name": "Customer Review Management",
  "nodes": [
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM",
          "mode": "list",
          "cachedResultName": "Google Review Mangement - Automation",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Customers",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Review Email",
              "lookupValue": "Not Sent"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -656,
        -48
      ],
      "id": "1f17dd91-e35b-41c2-b02a-e5998383fd07",
      "name": "Get row(s) in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7NQ8ucxBVwUr4Ye",
          "name": "Harsh Google Sheets"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "7bdd8638-3715-47a4-9acb-aa87447412b5",
              "leftValue": "={{ $json['Review msg Status'] }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        -448,
        -48
      ],
      "id": "91677c64-08b6-4eb5-927f-e2b7cb411e76",
      "name": "If"
    },
    {
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "subject": "Please Help us with your valuable Review",
        "emailType": "text",
        "message": "https://codepen.io/FusionSync-AI/pen/YPpJbev",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        128,
        -16
      ],
      "id": "cb1e9b17-96c9-4bb8-883d-8907c9bedafc",
      "name": "Send a message",
      "webhookId": "67c883ca-e924-49eb-8f9b-1f9e2fe93bd1",
      "credentials": {
        "gmailOAuth2": {
          "id": "3GCa77rU7PHNlpkP",
          "name": "Harsh Gmail"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -160,
        -144
      ],
      "id": "c577cdc7-0239-4bbb-97f8-94ae49e34c4b",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM",
          "mode": "list",
          "cachedResultName": "Google Review Mangement - Automation",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Customers",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $('Loop Over Items').item.json.Email }}",
            "Review Email": "Sent"
          },
          "matchingColumns": [
            "Email"
          ],
          "schema": [
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Date of Purchase",
              "displayName": "Date of Purchase",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Review Email",
              "displayName": "Review Email",
              "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": [
        416,
        96
      ],
      "id": "b45cd189-5286-4424-97e2-8f0e8581c381",
      "name": "Update row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7NQ8ucxBVwUr4Ye",
          "name": "Harsh Google Sheets"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "39d7b795-170e-4824-a461-702a877aabb6",
        "options": {
          "allowedOrigins": "*"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -672,
        576
      ],
      "id": "337f272a-8e80-4bd7-876c-1ceae88aa520",
      "name": "Receiving Customer Review ",
      "webhookId": "39d7b795-170e-4824-a461-702a877aabb6"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9ba43d55-9a36-4914-a4b7-4569b4432749",
              "name": "rating",
              "value": "={{ $json.body.rating }}",
              "type": "number"
            },
            {
              "id": "3c9c265a-6883-4ff6-92d5-7981d042c364",
              "name": "name",
              "value": "={{ $json.body.name }}",
              "type": "string"
            },
            {
              "id": "0675932f-dcab-48f4-b8bb-e907d51d6bb8",
              "name": "email",
              "value": "={{ $json.body.email }}",
              "type": "string"
            },
            {
              "id": "291a5860-3494-44ed-9c42-f1c5b54e4a0b",
              "name": "review",
              "value": "={{ $json.body.review }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -400,
        576
      ],
      "id": "294efa5b-5b9e-40cf-bf47-7ba3fe1a793b",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM",
          "mode": "list",
          "cachedResultName": "Google Review Mangement - Automation",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Customers",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $json.email }}",
            "Review Email": "Sent"
          },
          "matchingColumns": [
            "Email"
          ],
          "schema": [
            {
              "id": "Name",
              "displayName": "Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Date of Purchase",
              "displayName": "Date of Purchase",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Review Email",
              "displayName": "Review Email",
              "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": [
        -112,
        576
      ],
      "id": "7d64ae22-9920-4a2e-a0ad-1c21c79f6bbf",
      "name": "Update row in sheet1",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7NQ8ucxBVwUr4Ye",
          "name": "Harsh Google Sheets"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM",
          "mode": "list",
          "cachedResultName": "Google Review Mangement - Automation",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1623972794,
          "mode": "list",
          "cachedResultName": "Sheet2",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Ax9qNsVN_jsrlEyoqhF4HwTwr-LKaYfKpEjnjsIIbrM/edit#gid=1623972794"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $json.Email }}",
            "Name": "={{ $('Edit Fields').item.json.name }}",
            "Rating": "={{ $('Edit Fields').item.json.rating }}",
            "Customer Review": "={{ $('Edit Fields').item.json.review }}",
            "Handle With AI Or Manually": "Manually",
            "Replied Or Not": "Not Replied"
          },
          "matchingColumns": [],
          "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
            },
            {
              "id": "Customer Review",
              "displayName": "Customer Review",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Rating",
              "displayName": "Rating",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Handle With AI Or Manually",
              "displayName": "Handle With AI Or Manually",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Replied Or Not",
              "displayName": "Replied Or Not",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        128,
        576
      ],
      "id": "eeca8a89-c6e4-48c5-9c74-4f29b27de263",
      "name": "Append row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "c7NQ8ucxBVwUr4Ye",
          "name": "Harsh Google Sheets"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0300e62a-63fb-4dfc-9846-fa5fd119c267",
              "name": "reviewId",
              "value": "={{ $json.reviewId }}",
              "type": "string"
            },
            {
              "id": "8fddf4dc-749e-4bb4-85ee-c0a1d4d5203d",
              "name": "displayName",
              "value": "={{ $json.reviewer.displayName }}",
              "type": "string"
            },
            {
              "id": "b3673e44-fd36-4cb5-a5e0-d44a52323818",
              "name": "comment",
              "value": "={{ $json.comment }}",
              "type": "string"
            },
            {
              "id": "41c7e57f-09b2-484a-9149-36bdc860fb5f",
              "name": "createTime",
              "value": "={{ $json.createTime }}",
              "type": "string"
            },
            {
              "id": "894ae77f-ac03-4c19-8f50-1b4a4194c800",
              "name": "reviewReply",
              "value": "={{ $json.reviewReply }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -448,
        1104
      ],
      "id": "b920b2c0-2659-4555-a081-a3b5ef812b76",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=This is the Customer Review :-  {{ $json.comment }}\n\nCustomer Name : - {{ $json.displayName }}",
        "options": {
          "systemMessage": "You are a helpful assistant. write simple and short replies to the user's feedback"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        -240,
        1104
      ],
      "id": "7b9eb906-ccaa-4eb4-842a-0e6f094ac696",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1.1,
      "position": [
        -256,
        1392
      ],
      "id": "e483c384-ae16-49a4-81f2-adcf08da392b",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "xEdXDIPxkqE6OLxQ",
          "name": "Harsh Gemini"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -656,
        1104
      ],
      "id": "36b19211-895a-48bc-951f-e50b75a5f82b",
      "name": "Change this with Google Business Profile Trigger"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        112,
        1104
      ],
      "id": "4ee613eb-4910-41c3-9928-1c472e3c6abd",
      "name": "Add Reply to Google Business Profile"
    },
    {
      "parameters": {
        "content": "## Reply To Google Profile Review",
        "height": 592,
        "width": 1056
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        928
      ],
      "typeVersion": 1,
      "id": "2c1e4dcc-83c8-4df7-8aea-066b244f006e",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Send Customer's Email's to Add a review",
        "height": 560,
        "width": 1600
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        -192
      ],
      "typeVersion": 1,
      "id": "ccaac570-736e-4794-b9bb-4860ebf128ee",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -912,
        -48
      ],
      "id": "4dc69a2d-6544-4202-8064-c0bbfbb86a63",
      "name": "Schedule Trigger",
      "disabled": true
    },
    {
      "parameters": {
        "content": "## Receiving Customer's Bad Reviews\n",
        "height": 384,
        "width": 1168
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        432
      ],
      "typeVersion": 1,
      "id": "9164c661-d2ac-4c2a-8a02-6493788d033f",
      "name": "Sticky Note2"
    }
  ],
  "pinData": {
    "Send a message": [
      {
        "json": {
          "id": "19e9ccb41200e562",
          "threadId": "19e9ccb41200e562",
          "labelIds": [
            "SENT"
          ]
        },
        "pairedItem": {
          "item": 0
        }
      }
    ],
    "Receiving Customer Review ": [
      {
        "json": {
          "headers": {
            "connection": "upgrade",
            "host": "n8n.fusionsync.ai",
            "x-real-ip": "223.181.18.25",
            "x-forwarded-for": "223.181.18.25",
            "x-forwarded-proto": "https",
            "content-length": "124",
            "sec-ch-ua-platform": "\"Windows\"",
            "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36",
            "sec-ch-ua": "\"Brave\";v=\"149\", \"Chromium\";v=\"149\", \"Not)A;Brand\";v=\"24\"",
            "content-type": "application/json",
            "sec-ch-ua-mobile": "?0",
            "accept": "*/*",
            "sec-gpc": "1",
            "accept-language": "en-US,en;q=0.8",
            "origin": "https://cdpn.io",
            "sec-fetch-site": "cross-site",
            "sec-fetch-mode": "cors",
            "sec-fetch-dest": "empty",
            "referer": "https://cdpn.io/",
            "accept-encoding": "gzip, deflate, br, zstd"
          },
          "params": {},
          "query": {},
          "body": {
            "rating": 3,
            "name": "FusionSyncAI",
            "email": "maderchilla@gmail.com",
            "review": "kdkksd",
            "timestamp": "2026-06-08T06:12:53.691Z"
          },
          "webhookUrl": "https://n8n.fusionsync.ai/webhook/39d7b795-170e-4824-a461-702a877aabb6",
          "executionMode": "production"
        }
      }
    ],
    "Change this with Google Business Profile Trigger": [
      {
        "json": {
          "name": "accounts/123456789/locations/987654321/reviews/AbcXyZ_901",
          "reviewId": "AbcXyZ_901",
          "reviewer": {
            "profilePhotoUrl": "https://lh3.googleusercontent.com/a/ACg8ocLZ...",
            "displayName": "Rahul Sharma",
            "isAnonymous": false
          },
          "starRating": "FOUR",
          "comment": "The doctor was very professional and explained everything clearly. Waiting time was a bit long.",
          "createTime": "2026-01-15T08:43:27.541Z",
          "updateTime": "2026-01-15T08:43:27.541Z",
          "reviewReply": null
        }
      }
    ]
  },
  "connections": {
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receiving Customer Review ": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet1": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Add Reply to Google Business Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change this with Google Business Profile Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "34c40618-926e-435e-8afc-1e0b82f3ec30",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "135f7f0618c75a6e80cf675ebad1b517f2edfad4244594eac6beced9c5c87742"
  },
  "nodeGroups": [],
  "id": "76XmH3jw7oBlgYys",
  "tags": []
}