AutomationFlowsAI & RAG › Extract Contact Information From Business Cards with Mistral OCR and Gpt-4o-mini

Extract Contact Information From Business Cards with Mistral OCR and Gpt-4o-mini

ByWolfgang Renner @naviqo on n8n.io

This workflow automates the process of extracting contact details from business cards (PDF or image) and saving them directly into an n8n Data Table. No more manual data entry — just upload a card and let AI do the rest. Upload the business card via a web form (PDF or image).…

Event trigger★★★★☆ complexityAI-powered14 nodesHTTP RequestAgentOpenAI ChatOutput Parser StructuredMemory Buffer WindowData TableForm Trigger
AI & RAG Trigger: Event Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #9212 — we link there as the canonical source.

This workflow follows the Agent → Datatable recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "96Ab7Pgv1EJuTmxK",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Business card scanner",
  "tags": [
    {
      "id": "fhnwm2x2nil3wCDz",
      "name": "n8n database",
      "createdAt": "2025-10-03T02:19:57.035Z",
      "updatedAt": "2025-10-03T02:19:57.035Z"
    },
    {
      "id": "z50kYN6ZCBwCtje9",
      "name": "Mistral OCR",
      "createdAt": "2025-10-03T02:25:59.717Z",
      "updatedAt": "2025-10-03T02:25:59.717Z"
    },
    {
      "id": "IawKguNngWRq4lUe",
      "name": "OpenAI",
      "createdAt": "2025-10-06T02:33:58.972Z",
      "updatedAt": "2025-10-06T02:33:58.972Z"
    }
  ],
  "nodes": [
    {
      "id": "c333cb6d-8366-419c-bfee-c939485d9122",
      "name": "Mistral OCR API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        592
      ],
      "parameters": {
        "url": "https://api.mistral.ai/v1/ocr",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "ocr_output.json"
            }
          }
        },
        "jsonBody": "={\n  \"model\": \"mistral-ocr-latest\",\n  \"document\": {\n    \"type\": \"document_url\",\n    \"document_url\": \"data:application/pdf;base64,{{ $json.data }}\"\n  },\n  \"include_image_base64\": true\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7249608d-fe26-44c7-b33a-6ca1f6342bcf",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1088,
        592
      ],
      "parameters": {
        "text": "=Business Card: {{ $json.data.pages[0].markdown }}",
        "options": {
          "systemMessage": "You are a business card reader that reads the data from the card."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "ae9c9a46-f3e4-410b-8ea6-a64121a15f03",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1008,
        816
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "577cb6d1-2950-4c6a-b967-4e048b766663",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1328,
        816
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"firstname\": \"\",\n\t\"name\": \"\",\n    \"company\": \"\",\n    \"web\": \"\",\n    \"email\": \"\",\n    \"street\": \"\",\n    \"postcode\": \"\",\n    \"place\": \"\",\n    \"phone\": \"\",\n    \"mobile\": \"\",\n    \"jobdescription\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "43396e25-a83a-4c6c-87ba-dfedbf932858",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1136,
        816
      ],
      "parameters": {
        "sessionKey": "={{ $('Data to base64').item.json.submittedAt }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "c5364bc2-8e0a-4f34-a964-77630cf82d0a",
      "name": "Upsert row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1488,
        592
      ],
      "parameters": {
        "columns": {
          "value": {
            "name": "={{ $json.output.name }}",
            "email": "={{ $json.output.email }}",
            "phone": "={{ $json.output.phone }}",
            "place": "={{ $json.output.place }}",
            "mobile": "={{ $json.output.mobile }}",
            "street": "={{ $json.output.street }}",
            "company": "={{ $json.output.company }}",
            "postcode": "={{ $json.output.postcode }}",
            "firstname": "={{ $json.output.firstname }}",
            "jobdescription": "={{ $json.output.jobdescrition }}"
          },
          "schema": [
            {
              "id": "firstname",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "firstname",
              "defaultMatch": false
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "name",
              "defaultMatch": false
            },
            {
              "id": "company",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "company",
              "defaultMatch": false
            },
            {
              "id": "jobdescription",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "jobdescription",
              "defaultMatch": false
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false
            },
            {
              "id": "mobile",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "mobile",
              "defaultMatch": false
            },
            {
              "id": "street",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "street",
              "defaultMatch": false
            },
            {
              "id": "postcode",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "postcode",
              "defaultMatch": false
            },
            {
              "id": "place",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "place",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "email",
              "keyValue": "={{ $json.output.email }}"
            }
          ]
        },
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "WTKp1ogUGN0k0pD6",
          "cachedResultUrl": "/projects/xuL3yDGtM7UrPnER/datatables/WTKp1ogUGN0k0pD6",
          "cachedResultName": "business cards"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0b69909c-545f-4c4a-a8f9-84053017e3ee",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        128,
        592
      ],
      "parameters": {
        "options": {},
        "formTitle": "Business card scanner",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "business_card",
              "multipleFiles": false,
              "requiredField": true
            }
          ]
        },
        "formDescription": "Upload a business card (PDF or image)"
      },
      "typeVersion": 2.3
    },
    {
      "id": "dc7fd4f7-00c7-4443-9f8d-76215a52e1e9",
      "name": "Data to base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        352,
        592
      ],
      "parameters": {
        "options": {
          "keepSource": "both"
        },
        "operation": "binaryToPropery",
        "binaryPropertyName": "business_card"
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "80815e01-803d-4315-a608-8edf4eb33dc1",
      "name": "JSON Parser",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        816,
        592
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson",
        "binaryPropertyName": "ocr_output.json"
      },
      "typeVersion": 1
    },
    {
      "id": "de28fe50-b376-4b1a-96dc-0bbe856134ce",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        384
      ],
      "parameters": {
        "color": 7,
        "height": 400,
        "content": "# upload via a web form\npdf, jpg, ...."
      },
      "typeVersion": 1
    },
    {
      "id": "50f8ae36-5dda-4f6a-86f4-2ea5df1c9fa5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 656,
        "height": 400,
        "content": "# OCR via Mistral OCR API\n## [Docs](https://mistral.ai/news/mistral-ocr)"
      },
      "typeVersion": 1
    },
    {
      "id": "6e66a1c4-cfd0-4dcb-852f-7da5018e43dd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 576,
        "content": "# Extract the defined content\n## [Setup an openAI API key](hhttps://platform.openai.com/api-keys)"
      },
      "typeVersion": 1
    },
    {
      "id": "b3f5282d-bab5-4262-a611-5d16a23603db",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        384
      ],
      "parameters": {
        "color": 7,
        "height": 400,
        "content": "# upsert the database\nusing the email address as key criteria\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8e524da5-74de-4baa-9c77-9e1f16aca300",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        384
      ],
      "parameters": {
        "color": 5,
        "width": 608,
        "height": 400,
        "content": "## \ud83e\udde0 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 into an n8n Data Table.\n\nSetup:\n\t1.\tAdd your Mistral API key (HTTP Bearer YOUR_TOKEN_HERE).\n\t2.\tAdd your OpenAI API key (OpenAI Credentials).\n\t3.\tCreate a Data Table named business_cards with fields for name, company, email, phone, etc.\n\t4.\tEnable the Form Trigger to upload business cards and test the workflow.\n\n\u2705 Result: business cards are instantly digitized into searchable contact data."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8500aaf2-93b2-422e-b574-834b3127b137",
  "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
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the process of extracting contact details from business cards (PDF or image) and saving them directly into an n8n Data Table. No more manual data entry — just upload a card and let AI do the rest. Upload the business card via a web form (PDF or image).…

Source: https://n8n.io/workflows/9212/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow serves as a comprehensive "Workflow Nodes SEO & Documentation Generator". It uses AI to analyze, rename, and document n8n workflows, offering a streamlined way to optimize workflow reada

Form Trigger, n8n, Output Parser Autofixing +11
AI & RAG

This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post

Output Parser Structured, Google Gemini Chat, HTTP Request Tool +11
AI & RAG

Receives campaign parameters via form, creates a Smartlead campaign, sources qualified leads through Wiza based on your ICP description, researches each prospect with Perplexity AI, generates personal

HTTP Request, Output Parser Structured, Memory Buffer Window +6
AI & RAG

Top Branch Workflow A The Market Intelligence: Patrols the Market: Runs hourly to scrape competitor rates for future days. Gathers Intel: If prices spike, it instantly checks event announcements to se

HTTP Request, Data Table, Output Parser Structured +6
AI & RAG

This workflow generates comprehensive B2B leads, from a selected Business type in ANY CITY IN THE WORLD, including: Company name; Website; Email (enriched with AI Agent); Phone number; Address; Main L

Output Parser Structured, Memory Buffer Window, Agent +8