{
  "name": "V3 Daily Digest Sender",
  "nodes": [
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyDay",
              "hour": 19,
              "minute": 0
            }
          ]
        }
      },
      "id": "cron",
      "name": "7PM Daily Trigger",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        300,
        400
      ]
    },
    {
      "parameters": {
        "functionCode": "const data = this.getWorkflowStaticData('global');\nif (!data.digest || data.digest.length === 0) return [];\n\nconst combined = data.digest.join(\"\\n\\n---\\n\\n\");\ndata.digest = [];\n\nreturn [{ message: combined }];"
      },
      "id": "combine",
      "name": "Combine Digest",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        500,
        400
      ]
    },
    {
      "parameters": {
        "url": "https://graph.facebook.com/v18.0/YOUR_PHONE_NUMBER_ID/messages",
        "method": "POST",
        "authentication": "predefinedCredentialType",
        "sendBody": true,
        "bodyParametersJson": "={\n  \"messaging_product\": \"whatsapp\",\n  \"to\": \"YOUR_PHONE_NUMBER\",\n  \"type\": \"text\",\n  \"text\": {\n    \"body\": $json.message\n  }\n}"
      },
      "id": "whatsapp",
      "name": "Send WhatsApp Digest",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        700,
        400
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "cron": {
      "main": [
        [
          {
            "node": "combine",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "combine": {
      "main": [
        [
          {
            "node": "whatsapp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}