{
  "name": "Extract contact information from business cards with Mistral OCR and GPT-4o-mini",
  "nodes": [
    {
      "id": "c333cb6d-8366-419c-bfee-c939485d9122",
      "name": "Mistral OCR API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        592
      ]
    },
    {
      "id": "7249608d-fe26-44c7-b33a-6ca1f6342bcf",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1088,
        592
      ]
    },
    {
      "id": "ae9c9a46-f3e4-410b-8ea6-a64121a15f03",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1008,
        816
      ]
    },
    {
      "id": "577cb6d1-2950-4c6a-b967-4e048b766663",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1328,
        816
      ]
    },
    {
      "id": "43396e25-a83a-4c6c-87ba-dfedbf932858",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1136,
        816
      ]
    },
    {
      "id": "c5364bc2-8e0a-4f34-a964-77630cf82d0a",
      "name": "Upsert row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1488,
        592
      ]
    },
    {
      "id": "0b69909c-545f-4c4a-a8f9-84053017e3ee",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        128,
        592
      ]
    },
    {
      "id": "dc7fd4f7-00c7-4443-9f8d-76215a52e1e9",
      "name": "Data to base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        352,
        592
      ]
    },
    {
      "id": "80815e01-803d-4315-a608-8edf4eb33dc1",
      "name": "JSON Parser",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        816,
        592
      ]
    },
    {
      "id": "de28fe50-b376-4b1a-96dc-0bbe856134ce",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        384
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "# upload via a web form\npdf, jpg, ...."
      }
    },
    {
      "id": "50f8ae36-5dda-4f6a-86f4-2ea5df1c9fa5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        384
      ],
      "parameters": {
        "width": 656,
        "height": 400,
        "content": "# OCR via Mistral OCR API\n## [Docs](https://mistral.ai/news/mistral-ocr)"
      }
    },
    {
      "id": "6e66a1c4-cfd0-4dcb-852f-7da5018e43dd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        384
      ],
      "parameters": {
        "width": 496,
        "height": 576,
        "content": "# Extract the defined content\n## [Setup an openAI API key](hhttps://platform.openai.com/api-keys)"
      }
    },
    {
      "id": "b3f5282d-bab5-4262-a611-5d16a23603db",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        384
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "# upsert the database\nusing the email address as key criteria\n"
      }
    },
    {
      "id": "8e524da5-74de-4baa-9c77-9e1f16aca300",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        384
      ],
      "parameters": {
        "width": 608,
        "height": 400,
        "content": "## 🧠 Business Card Scanner\n\nThis workflow automatically extracts contact details from uploaded business card images or PDFs using Mistral OCR and OpenAI GPT-4o-mini, then saves the structured data int"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Upsert row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON Parser": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Data to base64": {
      "main": [
        [
          {
            "node": "Mistral OCR API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral OCR API": {
      "main": [
        [
          {
            "node": "JSON Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Data to base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}