{
  "name": "ASHDOCS — Form upload to extracted fields in Airtable",
  "nodes": [
    {
      "parameters": {
        "content": "## ASHDOCS setup\n1. Create a **Header Auth** credential: Name exactly `X-API-Key`, Value = your key (`ash_test_` sandbox keys run free).\n2. Attach it to the *Extract Data (ASHDOCS)* node and edit the schema to match the fields you need.\n3. Connect your Airtable credential on the last node.\n\nThe form must POST JSON containing a publicly downloadable `file_url` — the API fetches it server-side. The extraction result is itself a signed JSON URL, which the *Fetch Extraction* node downloads and parses.",
        "height": 360,
        "width": 400
      },
      "id": "c3000000-0000-4000-8000-000000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-480, -180]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "pdf-to-data",
        "options": {}
      },
      "id": "c3000000-0000-4000-8000-000000000002",
      "name": "Form 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/pdf-to-data",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"file_url\": \"{{ $json.body.file_url }}\", \"options\": {\"schema\": {\"invoice_number\": \"string\", \"total\": \"number\", \"issue_date\": \"string\"}, \"output\": \"url\"}}",
        "options": {}
      },
      "id": "c3000000-0000-4000-8000-000000000003",
      "name": "Extract Data (ASHDOCS)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "url": "={{ $json.file_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "id": "c3000000-0000-4000-8000-000000000004",
      "name": "Fetch Extraction",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "operation": "create",
        "columns": {
          "mappingMode": "autoMapInputData"
        },
        "options": {}
      },
      "id": "c3000000-0000-4000-8000-000000000005",
      "name": "Create Airtable Record",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [660, 0]
    }
  ],
  "connections": {
    "Form Webhook": {
      "main": [[{ "node": "Extract Data (ASHDOCS)", "type": "main", "index": 0 }]]
    },
    "Extract Data (ASHDOCS)": {
      "main": [[{ "node": "Fetch Extraction", "type": "main", "index": 0 }]]
    },
    "Fetch Extraction": {
      "main": [[{ "node": "Create Airtable Record", "type": "main", "index": 0 }]]
    }
  },
  "active": false,
  "settings": {},
  "pinData": {}
}
