{
  "name": "Extract pay slip data with Line Chatbot and Gemini to Google Sheets",
  "nodes": [
    {
      "id": "83f758b4-a80b-4f27-ac13-ee0958ed97f2",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        200,
        320
      ]
    },
    {
      "id": "c41976eb-4a35-4c59-8167-538c651ad7e5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        520
      ],
      "parameters": {
        "width": 620,
        "height": 500,
        "content": "## Extract text from image\n**Prompt for Gemini**\nAnalyze image and then return in JSON Response that has the only following value: Status, From, To, Date, Amount"
      }
    },
    {
      "id": "c3eb2420-a503-4039-874c-df3c2799c561",
      "name": "Line: Get Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        660
      ]
    },
    {
      "id": "e39e5392-b287-4efe-a9a9-1f241e82cd92",
      "name": "Message Type",
      "type": "n8n-nodes-base.set",
      "position": [
        -620,
        400
      ]
    },
    {
      "id": "a166e880-9291-4794-a6be-47f0a86e77e7",
      "name": "Message Classification",
      "type": "n8n-nodes-base.switch",
      "position": [
        -420,
        400
      ]
    },
    {
      "id": "d7c29939-dd8e-43e9-89f2-879dc8ea318c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 420,
        "height": 460,
        "content": "## Gemini AI Assistant\n\nAI Assistant using Gemini 2.0 Flash Experiment unlocks new possibilities for AI agents - intelligent systems that can use memory, reasoning, and planning to complete tasks for "
      }
    },
    {
      "id": "0df36c5d-ec2a-492d-b688-4bad8d81cf38",
      "name": "Text Message Processing",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        100,
        140
      ]
    },
    {
      "id": "dfafa5ba-a855-4ebf-a19d-2addb556e791",
      "name": "Image Message Processing",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        100,
        660
      ]
    },
    {
      "id": "b9a309bf-2c49-40e1-a0e4-9cced43d6e85",
      "name": "Line: Response to User",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        660
      ]
    },
    {
      "id": "ff5561fa-b334-4639-a513-554ee3507ab0",
      "name": "Line: Text Response to User",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        140
      ]
    },
    {
      "id": "850f1079-cecf-4680-835f-34af829ee8f5",
      "name": "Text from Slip Result",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1020,
        660
      ]
    },
    {
      "id": "a268daa7-76d9-437b-99e9-bd755eb4d36f",
      "name": "Line: Messaging API",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -820,
        400
      ]
    },
    {
      "id": "b3c4c66a-78d6-4ad5-9a5c-afef6f86e5cc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        0
      ],
      "parameters": {
        "width": 420,
        "height": 1020,
        "content": "## Reply to User\n\nReply the processing result to the user without coding or OCR processing."
      }
    },
    {
      "id": "6c76dc81-6c10-4522-9d5f-da4579391281",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        520
      ],
      "parameters": {
        "width": 420,
        "height": 500,
        "content": "## Insert result to Google Sheet\nGet all important information from the Pay Slip and insert into Google Sheet in the same format that we have provided in our prompt.\n"
      }
    },
    {
      "id": "49bac770-adb1-4ef3-8bf9-c8cf107471ad",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        260
      ],
      "parameters": {
        "width": 620,
        "height": 500,
        "content": "## Get Line Message from User\nUser can send message in both text and Pay Slip image then classify the message type in text or image so we could have single workflow for AI Assistant that support anyth"
      }
    },
    {
      "id": "9f034b6f-bb5b-4dc6-941d-b745f15da254",
      "name": "Google Gemini for Text",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        60,
        320
      ]
    },
    {
      "id": "15fa3203-9230-4a1d-9e0d-87652cb9d9ab",
      "name": "Google Gemini for Image",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        60,
        880
      ]
    }
  ],
  "connections": {
    "Message Type": {
      "main": [
        [
          {
            "node": "Message Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Line: Get Image": {
      "main": [
        [
          {
            "node": "Image Message Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Line: Messaging API": {
      "main": [
        [
          {
            "node": "Message Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "Text Message Processing",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini for Text": {
      "ai_languageModel": [
        [
          {
            "node": "Text Message Processing",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Line: Response to User": {
      "main": [
        [
          {
            "node": "Text from Slip Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message Classification": {
      "main": [
        [
          {
            "node": "Text Message Processing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Line: Get Image",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Google Gemini for Image": {
      "ai_languageModel": [
        [
          {
            "node": "Image Message Processing",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Text Message Processing": {
      "main": [
        [
          {
            "node": "Line: Text Response to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Message Processing": {
      "main": [
        [
          {
            "node": "Line: Response to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}