{
  "name": "DocumentPower — Analyze Invoice (Full + Quick)",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "id": "bf2c82a9-a9ae-47cd-8faa-268437771250"
    },
    {
      "parameters": {
        "filePath": "/home/node/.n8n-files/invoice-test.jpg"
      },
      "name": "Read Invoice File",
      "type": "n8n-nodes-base.readBinaryFile",
      "typeVersion": 1,
      "position": [
        460,
        300
      ],
      "notes": "Replace path with your file. Supports: PDF, JPG, PNG, DOCX (max 20MB).",
      "id": "c8aa852b-5cba-4256-bce8-84190122dfe2"
    },
    {
      "parameters": {
        "method": "document.analyze",
        "params": "{ \"question\": \"Extract: NIT, invoice number, date, items with quantities and prices, subtotal, tax, total.\" }",
        "product": "documentpower"
      },
      "name": "Analyze Full (entities+integrity+template)",
      "type": "n8n-nodes-mediavox.mediavox",
      "typeVersion": 2,
      "position": [
        680,
        200
      ],
      "credentials": {
        "mediavoxApi": {
          "name": "Mediavox API"
        }
      },
      "notes": "Returns structured data: NIT, invoice #, dates, line items, totals. Use session_id for follow-up questions.",
      "id": "36068bd9-7dfc-4b67-8b65-54b955827352"
    },
    {
      "parameters": {
        "method": "document.analyze_quick",
        "params": "{ \"question\": \"What is the total amount and who is the vendor?\" }",
        "product": "documentpower"
      },
      "name": "Analyze Quick (answer only)",
      "type": "n8n-nodes-mediavox.mediavox",
      "typeVersion": 2,
      "position": [
        680,
        400
      ],
      "credentials": {
        "mediavoxApi": {
          "name": "Mediavox API"
        }
      },
      "notes": "Faster (~3s). Use when you only need a text answer, not structured extraction.",
      "id": "76245b93-5b9b-4bc8-8d1f-0fe31a225b37"
    },
    {
      "parameters": {
        "method": "document.ask",
        "params": "={ \"question\": \"What are the payment terms?\", \"session_id\": \"{{ $node['Analyze Full (entities+integrity+template)'].json.session_id }}\" }",
        "product": "documentpower"
      },
      "name": "Ask Follow-up",
      "type": "n8n-nodes-mediavox.mediavox",
      "typeVersion": 2,
      "position": [
        920,
        200
      ],
      "credentials": {
        "mediavoxApi": {
          "name": "Mediavox API"
        }
      },
      "notes": "Answers from the document only — no external knowledge. Requires session_id from Analyze Full.",
      "id": "07fb90c4-3656-44f3-ab67-bad820adea5c"
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Read Invoice File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Invoice File": {
      "main": [
        [
          {
            "node": "Analyze Full (entities+integrity+template)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Analyze Quick (answer only)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Full (entities+integrity+template)": {
      "main": [
        [
          {
            "node": "Ask Follow-up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "saveDataSuccessExecution": "all",
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "tags": [
    "DocumentPower",
    "AI",
    "Invoice"
  ],
  "pinData": {},
  "active": false,
  "versionId": "81099938-1881-4cd4-9f91-0733d14c4f65",
  "meta": {
    "templateCredsSetupCompleted": true
  }
}