{
  "name": "Extract Business Card Contacts (Photo/Scan) to Google Sheets with LDX hub AnalyzeDoc",
  "tags": [],
  "nodes": [
    {
      "id": "3b015573-532f-4635-acac-d67027615a81",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {
          "buttonLabel": "Extract"
        },
        "formTitle": "Business Card \u2192 Google Sheets",
        "formFields": {
          "values": [
            {
              "fieldName": "card_file",
              "fieldType": "file",
              "fieldLabel": "Business Card",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".pdf,.jpg,.jpeg,.png"
            }
          ]
        },
        "formDescription": "Upload a business card photo or scan (PDF, JPEG, or PNG). LDX hub AnalyzeDoc extracts the contact details and appends them as one row to a Google Sheet."
      },
      "typeVersion": 2.5
    },
    {
      "id": "a571cca4-0e13-441b-80aa-eeae65f4c333",
      "name": "AnalyzeDoc: Extract Contact Details",
      "type": "n8n-nodes-ldxhub.ldxHub",
      "position": [
        224,
        0
      ],
      "parameters": {
        "model": "google/gemini-3.5-flash@high",
        "resource": "analyzeDoc",
        "output_format": "json",
        "system_prompt": "Extract the following fields from the provided business card.\n\nRules:\n- Copy values exactly as written on the card; do not translate or invent values.\n- email: lowercase.\n- phone / mobile: as printed, including the country code if shown, but do not start the value with a \"+\" (use \"81-3-1234-5678\" or \"(+1234567890\" instead of \"+1234567890\"). This keeps the number readable as text in spreadsheets.\n- website: the URL as printed.\n- If a field is not present on the card, use an empty string \"\".\n- notes: any other information on the card not covered by the fields below (e.g. qualifications, certifications, taglines, a name in another script).\n\nFields:\n- full_name: the person's name\n- job_title: their title or role\n- company: company or organization name\n- department: department or division\n- email: email address\n- phone: office or landline phone number\n- mobile: mobile phone number\n- address: postal address\n- website: company or personal website URL\n- notes: any other information on the card",
        "example_output": "{\"full_name\":\"\",\"job_title\":\"\",\"company\":\"\",\"department\":\"\",\"email\":\"\",\"phone\":\"\",\"mobile\":\"\",\"address\":\"\",\"website\":\"\",\"notes\":\"\"}",
        "pollingSettings": {
          "serverWaitSeconds": 10,
          "pollingMaxAttempts": 180
        },
        "binaryPropertyName": "card_file"
      },
      "credentials": {
        "ldxHubApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e810b804-17b1-4f66-b274-7b27c7506659",
      "name": "Parse Extracted JSON",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        448,
        0
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson",
        "binaryPropertyName": "card_file"
      },
      "typeVersion": 1
    },
    {
      "id": "74122748-f7b8-4d26-99c1-110387a1a911",
      "name": "Append Row to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        672,
        0
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": []
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "fbef954d-8bde-4584-9e5b-51ffb678f02e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 760,
        "content": "## Business Card \u2192 Google Sheets\nUpload a business card photo or scan via the built-in form \u2014 **LDX hub AnalyzeDoc** (vision AI) reads the card and appends the contact details as one row to your Google Sheet.\n\n**Setup**\n1. Install the verified community node `n8n-nodes-ldxhub` (v0.10.0 or later) and create an **LDXhub API** credential \u2014 get a free API key at https://gw.portal.ldxhub.io (25,000 credits/month, no credit card).\n2. Create a Google Sheet with this header row:\n`full_name, job_title, company, department, email, phone, mobile, address, website, notes`\n3. In **Append Row to Google Sheets**, select your Google credential, spreadsheet, and sheet.\n4. Activate the workflow and open the form URL \u2014 that's it."
      },
      "typeVersion": 1
    },
    {
      "id": "58dff8d1-62f1-4513-99e2-8915191512ab",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -360
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 320,
        "content": "## Customize the extraction\nEdit **System Prompt** and **Example Output** in the AnalyzeDoc node to change the fields \u2014 the Example Output defines the output schema. Keep the prompt's field list and the Example Output keys in sync.\nWorks with business cards in any language, including bilingual cards."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "AnalyzeDoc: Extract Contact Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Extracted JSON": {
      "main": [
        [
          {
            "node": "Append Row to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AnalyzeDoc: Extract Contact Details": {
      "main": [
        [
          {
            "node": "Parse Extracted JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}