{
  "name": "Daily Web Report → PDF",
  "nodes": [
    {
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [250, 300],
      "parameters": {
        "rule": {
          "interval": [{ "field": "hours", "hoursInterval": 24 }]
        }
      }
    },
    {
      "name": "HTML to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [500, 300],
      "parameters": {
        "method": "POST",
        "url": "https://agentmediatools.com/api/html-to-pdf",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "url", "value": "={{ $json.url }}" },
            { "name": "full_page", "value": true }
          ]
        },
        "options": {
          "response": { "responseFormat": "file" }
        }
      }
    },
    {
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [750, 300],
      "parameters": {
        "fromEmail": "reports@example.com",
        "toEmail": "={{ $json.recipient }}",
        "subject": "Daily Report — {{ $now.toFormat('yyyy-MM-dd') }}",
        "attachments": [{ "value": "={{ $json.data }}" }]
      }
    }
  ],
  "connections": {
    "Schedule": { "main": [[ { "node": "HTML to PDF", "type": "main", "index": 0 } ]] },
    "HTML to PDF": { "main": [[ { "node": "Send Email", "type": "main", "index": 0 } ]] }
  }
}
