{
  "name": "CredIQ \u2014 CSV Uploaded",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "crediq-csv",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "aa000001-csv0-0000-0000-000000000001",
      "name": "Webhook: CSV Uploaded",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json.body || $input.first().json;\nconst txCount = data.txCount || 0;\nconst months = data.monthsCovered || 0;\n\nreturn [{\n  json: {\n    message: `\ud83d\udcca New UPI Data Uploaded \u2014 CredIQ\\nTransactions: ${txCount}\\nMonths Covered: ${months}\\nStatus: Score recalculation started\\nTime: ${new Date().toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' })}`,\n    txCount,\n    months\n  }\n}];"
      },
      "id": "aa000002-csv0-0000-0000-000000000002",
      "name": "Format CSV Alert",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "from": "+14155238886",
        "to": "+916238046005",
        "toWhatsapp": true,
        "body": "={{ $json.message }}"
      },
      "id": "aa000003-csv0-twil-io00-000000000003",
      "name": "WhatsApp: CSV Alert",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        680,
        300
      ],
      "credentials": {
        "twilioApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{ \"status\": \"csv_received\" }"
      },
      "id": "aa000004-csv0-0000-0000-000000000004",
      "name": "Respond to CredIQ",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Webhook: CSV Uploaded": {
      "main": [
        [
          {
            "node": "Format CSV Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format CSV Alert": {
      "main": [
        [
          {
            "node": "WhatsApp: CSV Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp: CSV Alert": {
      "main": [
        [
          {
            "node": "Respond to CredIQ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "CredIQ"
    }
  ],
  "meta": {
    "templateCredsSetupCompleted": true
  }
}