n8n

How to Automate LINE to Google Sheets Slip Capture?

Collect payment slip data directly from chat and store it in a sheet without manual typing. Users send a message or a slip image in LINE, get an instant reply, and the key fields go into Google Sheets for finance tracking and review.

A webhook receives each LINE message and a Switch classifies it as text or image. For text, a chat agent with memory answers the user using Gemini, so the bot remembers the same user across messages. For images, the flow downloads the image from LINE, sends it to Gemini with a clear prompt, and expects JSON with Status, From, To, Date, and Amount. The bot replies to the user in LINE and then writes the slip results to Google Sheets in the same structure. This creates one place to handle both free text and payment slip images.

You will need a LINE Messaging API channel, a Google Sheets spreadsheet with the needed columns, and a Google Gemini API key. Teams can cut data entry time and reduce errors from manual reading. Common uses include bank slip verification, expense reviews, and payment confirmations inside chat. Set the sheet columns, connect your credentials, and test with a real slip image to see the record appear in seconds.

What are the key features?

  • LINE webhook receives both text and image messages from users
  • Smart message routing classifies content as text or image
  • User memory ties replies to the correct person using their LINE user ID
  • Text questions answered by a Gemini conversational agent with context
  • Image analysis uses Gemini to return JSON with Status, From, To, Date, and Amount
  • Image file is fetched from the LINE content API before analysis
  • Instant reply to the user in LINE with clean text output
  • Structured results are appended to Google Sheets for tracking

What are the benefits?

  • Reduce manual entry from 5 minutes per slip to under 30 seconds
  • Automate up to 90 percent of slip processing from chat to sheet
  • Improve data accuracy by extracting fields in a fixed JSON format
  • Handle high message volume without adding staff
  • Connect chat and spreadsheet so finance data stays in sync

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with LINE Messaging API, Google Sheets and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. In the LINE Developers Console, create a Messaging API channel. Copy the Channel access token and enable the webhook. Add your bot as a friend for testing.
  4. Open the Line: Messaging API node in n8n and copy the Production Webhook URL. Paste this URL into the LINE webhook settings and verify the connection.
  5. In the n8n credentials manager, create a new HTTP Header Auth credential for LINE. Set Authorization to Bearer and paste your Channel access token. Assign this credential to Line: Get Image, Line: Response to User, and Line: Text Response to User nodes.
  6. Create a Google Sheet with columns Status, From, To, Date, and Amount. Share it with the Google account you will use in n8n if needed.
  7. Open the Google Sheets node in n8n. In the credential dropdown, click Create new credential and choose Google Sheets OAuth2. Follow the on screen steps, then select your spreadsheet and the target sheet tab.
  8. Get a Google Gemini API key from Google AI Studio. In n8n, open the Google Gemini nodes and click Create new credential for Google PaLM or Gemini. Paste the API key and save. Assign this credential to both Google Gemini for Text and Google Gemini for Image nodes.
  9. Check the Message Classification rules. Confirm text messages go to the Text Message Processing path and image messages go to Line: Get Image and then Image Message Processing.
  10. Open the Image Message Processing node and confirm the image binary input is mapped from the Line: Get Image binary output. Ensure the prompt requests JSON with the five fields.
  11. Run a live test. Send a bank slip image to your LINE bot and confirm you receive a reply. Check that a new row appears in Google Sheets with Status, From, To, Date, and Amount.
  12. If replies fail, confirm the LINE token is valid and the replyToken is used within one minute. If Sheets does not update, verify the correct spreadsheet and sheet are selected and your account has edit access.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

LINE Messaging API

Sign up

Free plan (Communication): $0 / mo, 500 messages / mo (USA/Other regions)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.