{
  "id": "BFEFktdcbHgvQenx",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "\ud83d\udcc4 Image to text (OCR) \u2192 Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "e776e9fb-4f11-4eec-829e-e1638a3347c3",
      "name": "Run workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -160,
        256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "df95d0d0-d206-42c2-ad73-89bcce30c084",
      "name": "Set Image URL",
      "type": "n8n-nodes-base.set",
      "position": [
        128,
        256
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1+1234567890-+1234567890",
              "name": "imageUrl",
              "type": "string",
              "value": "https://tesseract.projectnaptha.com/img/eng_bw.png"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "df213b4a-bc18-4925-9903-68c90ba26550",
      "name": "Google Lens OCR (Apify)",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        480,
        256
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "eoVXILAQvzkbyNVrD",
          "cachedResultUrl": "https://console.apify.com/actors/eoVXILAQvzkbyNVrD/input",
          "cachedResultName": "Google Lens OCR API (getascraper/google-lens-ocr)"
        },
        "operation": "Run actor and get dataset",
        "customBody": "={\n  \"imageUrl\": \"{{ $json.imageUrl }}\",\n  \"outputDetail\": \"full\",\n  \"language\": \"en\",\n  \"region\": \"US\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "f19486ee-09bb-47ec-9e3d-1fddad10b69c",
      "name": "Extract OCR Text",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c1+1234567890-+1234567890",
              "name": "imageUrl",
              "type": "string",
              "value": "={{ $json.imageUrl }}"
            },
            {
              "id": "c1+1234567890-+1234567890",
              "name": "language",
              "type": "string",
              "value": "={{ $json.language }}"
            },
            {
              "id": "c1+1234567890-+1234567890",
              "name": "text",
              "type": "string",
              "value": "={{ $json.fullText }}"
            },
            {
              "id": "c1+1234567890-+1234567890",
              "name": "scrapedAt",
              "type": "string",
              "value": "={{ $json.scrapedAt }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "04ce75bf-257f-4870-a55d-f9c51d88f5fa",
      "name": "Append to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        816,
        400
      ],
      "parameters": {
        "columns": {
          "value": {},
          "mappingMode": "autoMapInputData",
          "matchingColumns": []
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Sheet1",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "REPLACE_WITH_YOUR_SHEET_ID"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "480abc7b-cb44-47a1-946b-b2c438cddd17",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 880,
        "content": "## \ud83d\udcc4 Image \u2192 text \u2192 Google Sheets\n\nDrop in any image URL and get its text pulled out and saved to a Google Sheet in one run. Powered by Apify's **Google Lens OCR** \u2014 nothing to install or train.\n\n### \ud83d\udca1 What you can do with it\n- Turn receipts, invoices, and business cards into spreadsheet rows\n- Pull text out of screenshots, product labels, and signage in bulk\n- Feed the text to an AI step to auto-fill columns (total, date, vendor)\n\n### \ud83d\ude80 Setup (2 minutes)\n1. Install the **Apify** node: nodes panel \u2192 search \"Apify\" \u2192 **Install**\n2. Add your free Apify token as an **Apify API** credential on the OCR node \u2014 grab one at [console.apify.com/account/integrations](https://console.apify.com/account/integrations)\n3. Point the **Append to Google Sheet** node at your sheet\n4. Click **Test workflow**\n\n### \u2705 Good to know\n- First 50 results of every run are free\n- Works on any public image (JPG, PNG, WebP)\n- No login or browser needed\n\n**Actor:** https://apify.com/getascraper/google-lens-ocr"
      },
      "typeVersion": 1
    },
    {
      "id": "ee19d14c-2241-4181-af51-a88b78672ba6",
      "name": "Sticky Note - Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 700,
        "content": "## \u25b6\ufe0f Run it\n\nClick **Test workflow** to run once. Swap in a **Schedule** or **Google Drive** trigger to run it automatically."
      },
      "typeVersion": 1
    },
    {
      "id": "335b7fce-7ee4-4d84-8f40-4274886b899f",
      "name": "Sticky Note - Set",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 700,
        "content": "## \ud83d\uddbc\ufe0f Set the image\n\nChange `imageUrl` to any public image. Prefilled with a sample so you can test right away."
      },
      "typeVersion": 1
    },
    {
      "id": "797997af-2161-4cdd-8e56-cdb8de140687",
      "name": "Sticky Note - OCR",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 700,
        "content": "## \ud83d\udd0d Read the text\n\nPulls every line of text from the image and returns `fullText`, the detected `language`, and word positions.\n\nFirst 50 results per run are free."
      },
      "typeVersion": 1
    },
    {
      "id": "4793e49b-e85f-47cd-bf95-480d6367176c",
      "name": "Sticky Note - Save",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -272
      ],
      "parameters": {
        "color": 7,
        "width": 280,
        "height": 860,
        "content": "## \ud83d\udcbe Clean up & save\n\nKeeps the fields you want and adds one row per image to **Google Sheets**.\n\nDrop an **OpenAI** node here to split receipts into columns."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8067bffc-2295-48ed-afbf-578aa6eaca41",
  "connections": {
    "Run workflow": {
      "main": [
        [
          {
            "node": "Set Image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Image URL": {
      "main": [
        [
          {
            "node": "Google Lens OCR (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract OCR Text": {
      "main": [
        [
          {
            "node": "Append to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Lens OCR (Apify)": {
      "main": [
        [
          {
            "node": "Extract OCR Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}