{
  "id": "rpJRbrZB336vk29m",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Trip Feedback Collection via Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "0ea98d6b-5380-4093-bb0c-6cb1e015d65e",
      "name": "Delay - Process Buffer",
      "type": "n8n-nodes-base.wait",
      "position": [
        420,
        260
      ],
      "parameters": {
        "amount": 7
      },
      "typeVersion": 1.1
    },
    {
      "id": "66a09a81-90c5-46a7-9caa-5000f52a1dcd",
      "name": "Trigger - Trip Form Submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        200,
        760
      ],
      "parameters": {
        "options": {
          "path": "trip-feedback",
          "customCss": ":root {\n--font-family: 'Roboto', sans-serif;\n  --font-weight-normal: 400;\n  --font-weight-bold: 700;\n  --font-size-body: 13px;\n  --font-size-label: 15px;\n  --font-size-test-notice: 12px;\n  --font-size-input: 15px;\n  --font-size-header: 20px;\n  --font-size-paragraph: 16px;\n  --font-size-link: 14px;\n  --font-size-error: 12px;\n  --font-size-html-h1: 30px;\n  --font-size-html-h2: 24px;\n  --font-size-html-h3: 18px;\n  --font-size-html-h4: 16px;\n  --font-size-html-h5: 14px;\n  --font-size-html-h6: 12px;\n  --font-size-subheader: 16px;\n  --color-background: #f5f7fa;\n  --color-test-notice-text: #e6a23d;\n  --color-test-notice-bg: #fefaf6;\n  --color-test-notice-border: #f6dcb7;\n  --color-card-bg: linear-gradient(145deg, #ffffff, #f8f9fa);\n  --color-card-border: #ced4da;\n  --color-card-shadow: rgba(0, 0, 0, 0.1);\n  --color-link: #007bff;\n  --color-header: #343a40;\n  --color-label: #495057;\n  --color-input-border: #ced4da;\n  --color-input-text: #495057;\n  --color-focus-border: #007bff;\n  --color-submit-btn-bg: #007bff;\n  --color-submit-btn-text: #ffffff;\n  --color-error: #dc3545;\n  --color-required: #ff6d5a;\n  --color-clear-button-bg: #6c757d;\n  --color-html-text: #343a40;\n  --color-html-link: #007bff;\n  --color-header-subtext: #6c757d;\n  --border-radius-card: 12px;\n  --border-radius-input: 8px;\n  --border-radius-clear-btn: 50%;\n  --card-border-radius: 12px;\n  --padding-container-top: 40px;\n  --padding-card: 32px;\n  --padding-test-notice-vertical: 12px;\n  --padding-test-notice-horizontal: 24px;\n  --margin-bottom-card: 20px;\n  --padding-form-input: 14px;\n  --card-padding: 32px;\n  --card-margin-bottom: 20px;\n  --container-width: 500px;\n  --submit-btn-height: 50px;\n  --checkbox-size: 20px;\n  --box-shadow-card: 0px 6px 20px 0px var(--color-card-shadow);\n  --opacity-placeholder: 0.6;\n  --spacing-question-gap: 320px; /* Added for question spacing */\n}\n\n/* Add company logo to form header */\n.form-header {\n\tposition: relative;\n\ttext-align: center;\n\tpadding-top: 80px; /* Space for logo */\n\tmargin-bottom: 20px;\n}\n\n.form-header::before {\n\tcontent: '';\n\tdisplay: block;\n\twidth: 200px; /* Adjust based on logo size */\n\theight: 60px; /* Adjust based on logo size */\n\tbackground-image: url('https://d1rdz15x9x7c4f.cloudfront.net/assets/payload-images/oc-blue-logo.svg');\n\tbackground-size: contain;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n/* Ensure form title and description don't overlap */\n.form-header h1, .form-header p {\n\tposition: relative;\n\tz-index: 1;\n}\n\n/* Hide the 'Form automated with' footer */\n.form-footer, [class*=\"form-footer\"], [class*=\"powered-by\"], [class*=\"branding\"] {\n\tdisplay: none !important;\n}\n\n/* Ensure form inputs are modern and clean */\ninput, select, textarea {\n\tborder: 1px solid var(--color-input-border);\n\tborder-radius: var(--border-radius-input);\n\tpadding: var(--padding-form-input);\n\tfont-size: var(--font-size-input);\n\tfont-family: var(--font-family);\n\tcolor: var(--color-input-text);\n}\n\ninput:focus, select:focus, textarea:focus {\n\tborder-color: var(--color-focus-border);\n\tbox-shadow: 0 0 5px rgba(0, 123, 255, 0.3);\n\toutline: none;\n}\n\n/* Style submit button */\nbutton[type=\"submit\"] {\n\tbackground-color: var(--color-submit-btn-bg);\n\tcolor: var(--color-submit-btn-text);\n\tborder-radius: var(--border-radius-input);\n\theight: var(--submit-btn-height);\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-input);\n\ttransition: background-color 0.3s ease;\n}\n\nbutton[type=\"submit\"]:hover {\n\tbackground-color: #0056b3;\n}",
          "appendAttribution": false
        },
        "formTitle": "Customer Feedback Questions for Trip",
        "formFields": {
          "values": [
            {
              "fieldLabel": "What is your Name?",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email ID",
              "requiredField": true
            },
            {
              "fieldLabel": "Contact Number",
              "placeholder": "(e.g, +1234567890)",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "How was your last trip with us ?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Very Dissatisfied"
                  },
                  {
                    "option": "Dissatisfied"
                  },
                  {
                    "option": "Neutral"
                  },
                  {
                    "option": "Satisfied"
                  },
                  {
                    "option": "Very Satisfied"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Did you like the taste of the food which we provide ?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "What place did you enjoy the most?",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Was our tour guide polite and helpful?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Yes"
                  },
                  {
                    "option": "No"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "How would you rate your overall trip experience?",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Any additional comments or suggestions?",
              "requiredField": true
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 2.2
    },
    {
      "id": "00d58be2-bc5e-4679-9f41-3b25fdc51a40",
      "name": "Tack All Feedback Item",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        500,
        760
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "5fc7df94-f6b1-44de-b5de-f87413762a0b",
      "name": "Update - Trip Feedback Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        740,
        740
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "form"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "9iuygtfr56yuhjn"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "ba90e00b-615c-407b-b790-834345db3cab",
      "name": "Send Email To That New User",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        640,
        260
      ],
      "parameters": {
        "text": "Please fill out this feedback form:\nhttps://n8n-devops.oneclicksales.xyz/form/trip-feedback",
        "options": {
          "appendAttribution": false
        },
        "subject": "Feedback",
        "toEmail": "={{ $json.Email }}",
        "fromEmail": "user@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "fd964543-987a-4aad-8a3e-72ee94f43663",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        100
      ],
      "parameters": {
        "width": 180,
        "height": 320,
        "content": "This node triggers the workflow whenever a new row is added to the Google Sheets feedback form."
      },
      "typeVersion": 1
    },
    {
      "id": "47b0f39d-aff9-46e9-bb42-ffc9fc9dc29b",
      "name": "Trigger - New User Entry",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        200,
        260
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour",
              "minute": 10
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "url",
          "value": "=https://docs.google.com/32er"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "435yrfdf1234"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "89637159-08c9-4237-a398-986813480462",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        100
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 320,
        "content": "This node introduces a delay to ensure the data is fully processed before sending notifications, avoiding premature actions."
      },
      "typeVersion": 1
    },
    {
      "id": "d56902da-e302-4e29-a3dd-0ff2eb5a9234",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        100
      ],
      "parameters": {
        "color": 4,
        "width": 180,
        "height": 320,
        "content": "This node sends an email with feedback form to the new user."
      },
      "typeVersion": 1
    },
    {
      "id": "f8e26d5b-5459-4586-a300-f39ccf7c4be1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        700,
        600
      ],
      "parameters": {
        "width": 180,
        "height": 300,
        "content": "This node appends or updates the trip feedback data in the Google Sheets, maintaining an organized record."
      },
      "typeVersion": 1
    },
    {
      "id": "844c8b36-db9f-4570-af51-ae7538bb3707",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        600
      ],
      "parameters": {
        "color": 5,
        "width": 180,
        "height": 300,
        "content": "This node iterates over each form submission item to process multiple entries if present, ensuring all data is handled."
      },
      "typeVersion": 1
    },
    {
      "id": "8bd62be1-7f96-4678-84e3-e3ebdb93f432",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        600
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 300,
        "content": "This node triggers the workflow when a trip feedback form is submitted, initiating the data processing loop."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "20181d45-f8ae-4f30-8e28-b4eeff34586d",
  "connections": {
    "Delay - Process Buffer": {
      "main": [
        [
          {
            "node": "Send Email To That New User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tack All Feedback Item": {
      "main": [
        [
          {
            "node": "Update - Trip Feedback Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Tack All Feedback Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger - New User Entry": {
      "main": [
        [
          {
            "node": "Delay - Process Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update - Trip Feedback Sheet": {
      "main": [
        []
      ]
    },
    "Trigger - Trip Form Submission": {
      "main": [
        [
          {
            "node": "Tack All Feedback Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}