{
  "name": "Screenshot → Save to Disk",
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [250, 300],
      "parameters": {
        "path": "screenshot",
        "options": {}
      }
    },
    {
      "name": "Screenshot Page",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [500, 300],
      "parameters": {
        "method": "POST",
        "url": "https://agentmediatools.com/api/screenshot",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "url", "value": "={{ $json.body.url }}" },
            { "name": "width", "value": 1280 },
            { "name": "full_page", "value": true },
            { "name": "format", "value": "png" }
          ]
        },
        "options": {
          "response": { "responseFormat": "file" }
        }
      }
    },
    {
      "name": "Write Binary File",
      "type": "n8n-nodes-base.writeBinaryFile",
      "typeVersion": 1,
      "position": [750, 300],
      "parameters": {
        "fileName": "/tmp/screenshot-{{ $now.toISO().split('T')[0] }}.png",
        "dataPropertyName": "data"
      }
    }
  ],
  "connections": {
    "Webhook": { "main": [[ { "node": "Screenshot Page", "type": "main", "index": 0 } ]] },
    "Screenshot Page": { "main": [[ { "node": "Write Binary File", "type": "main", "index": 0 } ]] }
  }
}
