{
  "name": "ASHDOCS — Webhook HTML to PDF into Google Drive",
  "nodes": [
    {
      "parameters": {
        "content": "## ASHDOCS setup\n1. Create a **Header Auth** credential: Name exactly `X-API-Key`, Value = your key (an `ash_test_` sandbox key runs everything without consuming credits).\n2. Attach it to the *Create PDF (ASHDOCS)* node.\n3. Connect your own Google Drive credential on the last node.\n\nThe API returns JSON with a signed 60-minute `file_url` — the *Download PDF* node turns it into the binary Drive needs.",
        "height": 320,
        "width": 380
      },
      "id": "a1000000-0000-4000-8000-000000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-460, -160]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "html-to-pdf",
        "options": {}
      },
      "id": "a1000000-0000-4000-8000-000000000002",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [0, 0],
      "webhookId": "replace-on-import"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.ashdocs.com/api/v1/tools/html-to-pdf",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"html\": \"{{ $json.body.html }}\", \"options\": {\"format\": \"A4\", \"output\": \"url\"}}",
        "options": {}
      },
      "id": "a1000000-0000-4000-8000-000000000003",
      "name": "Create PDF (ASHDOCS)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "url": "={{ $json.file_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "a1000000-0000-4000-8000-000000000004",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "name": "ashdocs-output.pdf",
        "options": {}
      },
      "id": "a1000000-0000-4000-8000-000000000005",
      "name": "Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [660, 0]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [[{ "node": "Create PDF (ASHDOCS)", "type": "main", "index": 0 }]]
    },
    "Create PDF (ASHDOCS)": {
      "main": [[{ "node": "Download PDF", "type": "main", "index": 0 }]]
    },
    "Download PDF": {
      "main": [[{ "node": "Upload to Google Drive", "type": "main", "index": 0 }]]
    }
  },
  "active": false,
  "settings": {},
  "pinData": {}
}
