{
  "name": "SMS Vert Pro - Alerte de solde bas",
  "nodes": [
    {
      "parameters": {
        "rule": { "interval": [{ "field": "days", "triggerAtHour": 9 }] }
      },
      "id": "5b0e4c1a-0003-4a6e-9c01-7f3d2a300001",
      "name": "Chaque jour à 9 h",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "serverTransport": "httpStreamable",
        "endpointUrl": "https://www.smsvertpro.com/mcp/",
        "authentication": "bearerAuth",
        "tool": { "__rl": true, "mode": "id", "value": "check_credits" },
        "inputMode": "json",
        "jsonInput": "{}",
        "options": {}
      },
      "id": "5b0e4c1a-0003-4a6e-9c01-7f3d2a300002",
      "name": "Solde SMS",
      "type": "@n8n/n8n-nodes-langchain.mcpClient",
      "typeVersion": 1,
      "position": [240, 0]
    },
    {
      "parameters": {
        "conditions": {
          "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 },
          "conditions": [
            {
              "id": "5b0e4c1a-0003-4a6e-9c01-7f3d2a3000c1",
              "leftValue": "={{ $json.structuredContent.credits }}",
              "rightValue": 500,
              "operator": { "type": "number", "operation": "lt" }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "5b0e4c1a-0003-4a6e-9c01-7f3d2a300003",
      "name": "Moins de 500 crédits ?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [480, 0]
    },
    {
      "parameters": {
        "serverTransport": "httpStreamable",
        "endpointUrl": "https://www.smsvertpro.com/mcp/",
        "authentication": "bearerAuth",
        "tool": { "__rl": true, "mode": "id", "value": "send_sms" },
        "inputMode": "json",
        "jsonInput": "={{ JSON.stringify({ to: ['33612345678'], message: 'Alerte : il reste ' + $json.structuredContent.credits + ' credits sur votre compte SMS Vert Pro. Pensez a recharger.', sender: 'MaSociete' }) }}",
        "options": {}
      },
      "id": "5b0e4c1a-0003-4a6e-9c01-7f3d2a300004",
      "name": "Me prévenir par SMS",
      "type": "@n8n/n8n-nodes-langchain.mcpClient",
      "typeVersion": 1,
      "position": [720, -100]
    }
  ],
  "connections": {
    "Chaque jour à 9 h": { "main": [[{ "node": "Solde SMS", "type": "main", "index": 0 }]] },
    "Solde SMS": { "main": [[{ "node": "Moins de 500 crédits ?", "type": "main", "index": 0 }]] },
    "Moins de 500 crédits ?": { "main": [[{ "node": "Me prévenir par SMS", "type": "main", "index": 0 }], []] }
  },
  "settings": { "executionOrder": "v1" },
  "pinData": {}
}
