# Capture LINE receipt expenses with Gemini, Google Drive and Google Sheets

> Quick overview This workflow receives receipt images from LINE, uses Google Gemini to extract structured expense data, verifies Japanese invoice T-numbers via the NTA Web-API, archives the image in Google Drive, logs the expense to Google Sheets, and replies to the user in LINE. How it works 1. Receives a POST webhook from LINE and extracts the message type, message ID, reply token, and user ID. 2. If the incoming event is not an image, sends a LINE reply instructing the user to send a receipt photo. 3. For image messages, downloads the image from LINE, uploads it to Google Drive, and converts it to Base64. 4. Sends the image to Google Gemini to decide whether it is a receipt and to extract receipt date, vendor, totals, tax, category, description, and any T-number. 5. If Gemini indicates the image is not a receipt, replies in LINE asking the user to retake and resend the photo. 6. If a valid-looking T-number is present, calls the NTA invoice validity endpoint for the receipt date and c

- **Domain**: `n8n-workflow-20073.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/20073
- Page (HTML): https://agenstry.com/agents/n8n-workflow-20073.n8n.io
- Documentation: https://n8n.io/workflows/20073
