n8n

How to Automate LINE Payments to Google Sheets?

Capture bank slip images sent on LINE, save the file in Google Drive, and log key payment details in Google Sheets. Teams can confirm transfers fast without typing data by hand. Ideal for stores that verify payments before shipping orders.

A webhook receives an image from LINE. The flow builds the file URL, downloads the image with secure headers, and uploads it to a set Drive folder with the message id as the file name. An OCR.space request reads Thai text from the slip and returns raw text. Code then pulls fields like amount, fee, date and time, sender name, and receiver bank. The row is appended to a sheet with clean columns for easy review.

Setup needs a LINE Messaging API channel, a Google account for Drive and Sheets, and an OCR.space API key. Expect faster checks and fewer mistakes, often cutting slip handling from 15 minutes to 2 minutes per payment. Great for shops that get transfer slips on chat and need a daily payment log with both the image and the parsed data in one place.

What are the key features?

  • Webhook intake from LINE Messaging API to receive image events
  • Set node builds the LINE content URL using the message id
  • HTTP Request downloads the image with secure header authorization
  • Google Drive upload stores the slip in a chosen folder with a dynamic filename
  • OCR.space call extracts Thai text from the uploaded image
  • Code node parses OCR text to get amount, fee, date and time, sender name, and receiver bank
  • Google Sheets append adds a clean row with mapped fields for review

What are the benefits?

  • Reduce manual work from 15 minutes to 2 minutes per slip
  • Improve data accuracy by up to 90 percent by avoiding manual entry
  • Connect LINE, Google Drive, Google Sheets, and OCR in one flow
  • Handle up to 10 times more payment volume without extra staff
  • Create a searchable archive of slips and records for audits
  • Speed up order release by confirming payments faster

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 Drive, Google Sheets and OCR.space. 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 and issue a Channel access token. Enable the webhook feature for the channel.
  4. In n8n, open the Line Chat Bot node and copy the Test URL. Paste this URL into the webhook URL field in the LINE Developers console and verify that the webhook is active.
  5. Double click the Get image to Binary node. In the credential dropdown, click Create new credential, choose Header Auth, and set the Authorization header to Bearer YOUR_LINE_CHANNEL_ACCESS_TOKEN. Save the credential.
  6. Open the Upload image to Google Drive node. In the credential dropdown, click Create new credential for Google Drive, sign in to your Google account, and approve access. Pick or paste the Drive folder where slips will be stored.
  7. Set the file name expression to use the message id, for example {{ $('Line Chat Bot').item.json.body.events[0].message.id }}.jpg, and confirm the binary property is set to the downloaded image.
  8. Open the Send Image URL to OCR Space for Text Extraction node. Add your OCR.space API key to the apikey field, set language to tha, and ensure the url parameter points to a publicly accessible image link. If using Google Drive, set sharing to Anyone with the link or use a direct webContentLink.
  9. Open the Record in Google Sheets node. Create or select a Google Sheets credential, choose your spreadsheet and worksheet, and confirm the column mappings for amount, fee, date and time, sender name, and receiver bank.
  10. Test the flow: Click Execute Node on the Line Chat Bot node to open the test URL. Send a slip image to your LINE bot. Confirm a file appears in the Drive folder and a new row is added to the sheet.
  11. Troubleshoot: If OCR returns empty text, make sure the image URL is public and the language is set to tha. If the download fails, check the LINE access token and that the event contains an image message.
  12. Validate with several slip formats. Adjust the Extract Transaction Details code patterns if banks format fields differently.

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 Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

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)

OCR.space

Sign up

Free tier: $0 / mo, 25,000 conversions / mo (rate limit ~180/hour)

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.