{
  "name": "Automate consent dispute handling with GPT-4o, Google Sheets, Gmail & Slack",
  "nodes": [
    {
      "id": "cbe5276d-83e5-4a49-aee1-0c2cb93c1e83",
      "name": "Receive Consent Complaint",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -752,
        -272
      ]
    },
    {
      "id": "7d385bbd-b75c-4dcc-adb3-430edc0c785a",
      "name": "Check Required Fields",
      "type": "n8n-nodes-base.if",
      "position": [
        -416,
        -272
      ]
    },
    {
      "id": "7f77ea83-4a09-49a6-bfc2-a8f0f93b9f46",
      "name": "Clean & Normalize Complaint Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -112,
        -288
      ]
    },
    {
      "id": "10cdddc5-a71d-4b24-9955-68cc7d8babf4",
      "name": "Log Invalid Complaint Records to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -192,
        208
      ]
    },
    {
      "id": "3d94139c-bfb9-4406-98d1-26869e21b7ac",
      "name": "Store Complaint Ticket in Consent Dispute Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        192
      ]
    },
    {
      "id": "ab685ae5-c047-45a0-b6a5-69a3b6dac532",
      "name": "Generate Acknowledgement Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        416,
        -288
      ]
    },
    {
      "id": "91653813-33dd-40a1-8773-7b907f437734",
      "name": "Configure GPT-4o – Email Generator",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        416,
        -80
      ]
    },
    {
      "id": "dc5d4edd-f4b4-45c7-881a-6ece95694ad4",
      "name": "Extract Email Subject + Body",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        -288
      ]
    },
    {
      "id": "5657485d-212c-44bc-a076-3f5eac5efc3b",
      "name": "Send Acknowledgement Email to User",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1072,
        -288
      ]
    },
    {
      "id": "324e339f-7809-4883-9e15-37e215c52ab3",
      "name": "Configure GPT-4o – Slack Summary Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1360,
        -32
      ]
    },
    {
      "id": "d4241f68-8042-4cc2-be84-aecfdca7cc3b",
      "name": "Generate Slack Incident Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1360,
        -288
      ]
    },
    {
      "id": "992919fb-3739-4b23-8f99-d12b63cdf6c9",
      "name": "Slack – Notify Compliance Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        1760,
        -288
      ]
    },
    {
      "id": "89a1f190-aa8e-467a-9c51-908d503c3941",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -896
      ],
      "parameters": {
        "width": 640,
        "height": 496,
        "content": "## 🛡️ AI-Driven Consent Dispute Reporting & Response Workflow\nHandles and tracks user complaints regarding data consent or privacy under the DPDP Act.  \nAutomates ticket creation, acknowledgment email"
      }
    },
    {
      "id": "e6ce7324-4d78-429c-ac9b-f5197e2f9c25",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -464
      ],
      "parameters": {
        "width": 544,
        "height": 384,
        "content": "## Intake & Validation  \nWebhook receives complaint payload → Mandatory field check performed.  \nInvalid submissions are logged separately in Google Sheets for audit + retries.\n"
      }
    },
    {
      "id": "6cafdc7d-f8e8-4dc2-bde0-0013c0d23641",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -512
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## Data Normalization & Ticket Creation  \n- Generates unique Ticket ID  \n- Assigns status and priority  \n- Extracts relevant complainant information  \n- Prepares clean JSON for downstream actions\n"
      }
    },
    {
      "id": "8b47f5bf-c74c-472b-9080-7d93c20a7ef5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        64
      ],
      "parameters": {
        "width": 640,
        "height": 336,
        "content": "## Complaint Storage & Logging  \nValid complaints → appended to \"Consent Dispute\" sheet  \nInvalid complaints → appended to \"Invalid Intake\" sheet  \nUsed for compliance, tracking, reporting & audits\n"
      }
    },
    {
      "id": "dd87cf63-78f3-43ed-b0c9-cb881acc75ae",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -480
      ],
      "parameters": {
        "width": 960,
        "height": 528,
        "content": "## Acknowledgement Email Flow  \nGPT-4o drafts DPDP-compliant acknowledgement → Subject & body parsed →  \nDelivered automatically via Gmail to complainant.\n"
      }
    },
    {
      "id": "45f6436d-7836-4c31-bd24-9836eaab09e1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -480
      ],
      "parameters": {
        "width": 672,
        "height": 608,
        "content": "## Slack Compliance Alert  \nGenerates concise internal summary with ticket reference, priority & description  \n→ Sent to compliance team for immediate action & follow-up.\n"
      }
    }
  ],
  "connections": {
    "Check Required Fields": {
      "main": [
        [
          {
            "node": "Clean & Normalize Complaint Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Invalid Complaint Records to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Consent Complaint": {
      "main": [
        [
          {
            "node": "Check Required Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email Subject + Body": {
      "main": [
        [
          {
            "node": "Send Acknowledgement Email to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Acknowledgement Email": {
      "main": [
        [
          {
            "node": "Extract Email Subject + Body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Slack Incident Summary": {
      "main": [
        [
          {
            "node": "Slack – Notify Compliance Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean & Normalize Complaint Data": {
      "main": [
        [
          {
            "node": "Store Complaint Ticket in Consent Dispute Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Acknowledgement Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Acknowledgement Email to User": {
      "main": [
        [
          {
            "node": "Generate Slack Incident Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o – Email Generator": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Acknowledgement Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o – Slack Summary Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Slack Incident Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}