{
  "name": "Extract structured data from medical documents with Google Gemini AI",
  "nodes": [
    {
      "id": "e363dddf-da87-44e2-9f4d-f9d66a6b2bbc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 520,
        "content": "# Medical Document AI Analysis\n\n**Extract structured data from medical documents using Google Gemini AI**\n\n• Classifies document types (receipts, prescriptions, reports)\n• 95%+ text extraction accurac"
      }
    },
    {
      "id": "2da8f7ac-709a-420d-a1c3-6a6ec1dcb5c4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 520,
        "content": "# Setup Requirements\n\n**What you need:**\n• Google Gemini API Key (from Google AI Studio)\n• Add credentials to n8n\n\n**Setup:**\n1. Import workflow\n2. Configure Gemini credentials\n3. Test with image URL\n"
      }
    },
    {
      "id": "84d77cf0-b9f0-441b-ad0c-531c3ff78768",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1560,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 520,
        "content": "# API Usage\n\n**Input:**\n```json\n{\n  \"image_url\": \"https://example.com/receipt.jpg\"\n}\n```\n\n**Output:**\n```json\n{\n  \"documentType\": \"financial\",\n  \"content\": {\n    \"amount\": 150.00\n  },\n  \"confidence\": "
      }
    },
    {
      "id": "9ed438ec-475a-49aa-8980-aec3e5c45c27",
      "name": "Webhook Input",
      "type": "n8n-nodes-base.webhook",
      "position": [
        280,
        1120
      ]
    },
    {
      "id": "e13a0dda-b09a-4cfe-83ef-2a8f336fcb6d",
      "name": "Parse Input",
      "type": "n8n-nodes-base.set",
      "position": [
        460,
        1120
      ]
    },
    {
      "id": "2216fddb-edf6-41b2-bc87-e4fdeecfe039",
      "name": "Download Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        1120
      ]
    },
    {
      "id": "b40dfc91-06a7-4e8f-a7a0-e15e5bd2c1cd",
      "name": "Extract to Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        820,
        1120
      ]
    },
    {
      "id": "5502a987-82bf-4879-a06b-d24fcd0e3817",
      "name": "Prepare for AI",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        1120
      ]
    },
    {
      "id": "84fcd675-a04f-4ec2-a10d-020cb0b6854d",
      "name": "Gemini Classify Extract",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        1120
      ]
    },
    {
      "id": "04084e15-5bbf-4a7b-b316-9dc71382e8cd",
      "name": "Parse AI Results",
      "type": "n8n-nodes-base.set",
      "position": [
        1380,
        1120
      ]
    },
    {
      "id": "29dc5d4f-4e1a-40de-be64-6ed47353473b",
      "name": "Gemini Structure Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1580,
        1120
      ]
    },
    {
      "id": "56d8908a-a200-49bb-9881-636c98a43dae",
      "name": "Finalize Track",
      "type": "n8n-nodes-base.set",
      "position": [
        1780,
        1120
      ]
    },
    {
      "id": "106bff46-74e6-400d-994a-6aad4effdc1a",
      "name": "API Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1980,
        1120
      ]
    },
    {
      "id": "d4cdf8ca-13e3-4b42-832d-38750b2727d9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 520,
        "content": "# Technical Details\n\n**AI Model:** Google Gemini 2.0 Flash\n• Optimized for document processing\n• Superior OCR accuracy\n• Multi-language support\n\n**Requirements:**\n• Google Gemini API access\n• Internet"
      }
    },
    {
      "id": "d3d2b495-3bc8-406a-81cf-b40ed90882da",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 520,
        "content": "# Quick Start\n\n**Test in 3 steps:**\n1. Import workflow\n2. Add Gemini API credentials\n3. Send test request\n\n**Test request:**\n```\nPOST /webhook/analyze-medical-document\n{ \"image_url\": \"your-image-url\" "
      }
    },
    {
      "id": "c983283b-8ac7-448c-8b53-7d17496bcf54",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        1000
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "## Replace with your Gemini API Key"
      }
    },
    {
      "id": "829f2952-42ab-4f9c-a98b-30a3fb4d1228",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        1000
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "## Replace with your Gemini API Key"
      }
    }
  ],
  "connections": {
    "Parse Input": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Input": {
      "main": [
        [
          {
            "node": "Parse Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Extract to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finalize Track": {
      "main": [
        [
          {
            "node": "API Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare for AI": {
      "main": [
        [
          {
            "node": "Gemini Classify Extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Results": {
      "main": [
        [
          {
            "node": "Gemini Structure Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract to Base64": {
      "main": [
        [
          {
            "node": "Prepare for AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Structure Data": {
      "main": [
        [
          {
            "node": "Finalize Track",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Classify Extract": {
      "main": [
        [
          {
            "node": "Parse AI Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}