{
  "name": "Automate data extraction from faxes & PDFs using Google Gemini and Google Sheets",
  "nodes": [
    {
      "id": "5be36f47-e7ed-464a-bf73-6573abed5fc6",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -336,
        160
      ]
    },
    {
      "id": "4e9b17d5-0ded-4edb-baa5-b7eae5d0ecfa",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -528,
        160
      ]
    },
    {
      "id": "579a0a77-34bd-4f38-a22a-dfc68421b0b9",
      "name": "Call Gemini 2.0 Flash with PDF Capabilities",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        160
      ]
    },
    {
      "id": "07953a5f-115a-4697-9961-f5d7046ec6db",
      "name": "Define Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        -768,
        160
      ]
    },
    {
      "id": "e570291a-6ca2-49f4-be02-a837be4444f6",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1072,
        160
      ]
    },
    {
      "id": "37801239-6daf-4445-9004-01523094018a",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        848,
        160
      ]
    },
    {
      "id": "ca632b40-621b-4359-9e80-31706f374831",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        384,
        160
      ]
    },
    {
      "id": "0330fa20-6915-42c5-8769-0f2658f5b035",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        368,
        336
      ]
    },
    {
      "id": "d022685e-fe91-4980-b257-0ec2e7989491",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        544,
        336
      ]
    },
    {
      "id": "bea9b647-0e25-47ee-9eab-c952f512b03f",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1376,
        160
      ]
    },
    {
      "id": "a452a474-38ee-426b-b225-fd8f65bbd878",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        160
      ]
    },
    {
      "id": "26f7cfb0-39bb-47f8-8f6c-4d5e87dd999c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1456,
        -16
      ],
      "parameters": {
        "width": 272,
        "height": 320,
        "content": "## 1. Start Here: Form Trigger \n* This is the entry point for the workflow.\n* It creates a web form where a user can upload the FAX PDF file."
      }
    },
    {
      "id": "43885ab6-67d3-4d46-8202-83e3228d68b2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -32
      ],
      "parameters": {
        "width": 288,
        "height": 336,
        "content": "## 2. Configure: Upload to Google Drive\n* Select your Google Drive account from the 'Credentials' dropdown.\n* Change the Folder ID to the specific Google Drive folder where you want to save the faxes."
      }
    },
    {
      "id": "c0e958e2-f39b-4463-8ef1-a46ae0a129d7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -16
      ],
      "parameters": {
        "width": 224,
        "height": 320,
        "content": "## 3. Customize AI Brain (Part 1)\n* You can edit the *prompt* value here to change the extraction rules or ask for different information."
      }
    },
    {
      "id": "8c973931-b16b-4c81-888d-5869b52544e8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -16
      ],
      "parameters": {
        "width": 272,
        "height": 320,
        "content": "## 4. First AI Call: PDF Extraction\n* **ACTION REQUIRED**: You must select your \"Google Palm API\" credentials from the dropdown for this node to work."
      }
    },
    {
      "id": "1bc9982f-4880-4552-88c6-b5f2f296d1d7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -48
      ],
      "parameters": {
        "width": 352,
        "height": 320,
        "content": "## 5. Customize AI Brain (Part 2)\nThis second AI call structures the cleaned text into a strict JSON format.\n* **ACTION REQUIRED**: In the connected Google Gemini Chat Model node, select your Gemini A"
      }
    },
    {
      "id": "c4e2b238-0152-46f2-8195-d25ad26d5882",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -48
      ],
      "parameters": {
        "width": 384,
        "height": 352,
        "content": "## Final Step: Save to Google Sheets\n* **ACTION REQUIRED**: Configure your Google Sheets credentials.\n* **ACTION REQUIRED**: Update the Document ID with the ID of your own Google Sheet.\n* Ensure the c"
      }
    },
    {
      "id": "5e10a3b1-73f2-4263-8ebd-2f9e0b7db9bf",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -416
      ],
      "parameters": {
        "width": 480,
        "height": 336,
        "content": "## Extraction Values\n* Once the workflow is set up and all nodes are configured, define the fields you want to extract from the *fax* content.\n\n* Add corresponding column fields in *Google Sheets* for"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Define Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Prompt": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Call Gemini 2.0 Flash with PDF Capabilities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Call Gemini 2.0 Flash with PDF Capabilities": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}