๐Ÿ”ฌ Save business card contacts from LINE photos to Google Sheets using Gemini

โšก 23 views ยท ๐Ÿ”ฌ Document Extraction & Analysis

Description

Save business card contacts from LINE photos to Google Sheets with Gemini


Who is this for

Sales professionals, account managers, and anyone who exchanges business cards regularly. Designed especially for LINE users (Japan, Taiwan, Thailand, etc.) who want to eliminate manual data entry after networking events or client meetings.

What this workflow does

When a user sends a business card photo to a LINE bot, Gemini AI automatically extracts contact information (name, company, job title, phone number, email, postal address) and saves it to Google Sheets. Duplicate entries are detected by email address and skipped automatically. The team receives a Slack notification for every new contact, and the user gets an instant LINE confirmation.

How to set up

  1. Create a LINE Messaging API channel and obtain a Channel Access Token
  2. Prepare a Google Sheet with columns: Timestamp, Name, Company, Title, Phone, Email, Address, LINE_UID
  3. Get a Google Gemini API key from Google AI Studio
  4. Set up a Slack Incoming Webhook URL
  5. Enter all credentials in the Set Configuration Parameters node
  6. Register the n8n Webhook URL in LINE Developer Console

Requirements

How to customize

Adjust Google Sheets columns to match your CRM fields. Add a HubSpot or Salesforce node after the Sheets node to sync contacts directly to your CRM. Replace Slack with Microsoft Teams or Discord for team notifications.


Node List

#Node NameTypeRole
1Set Configuration ParametersSetCentralizes all credentials and config values
2When LINE Event ReceivedWebhookReceives LINE Webhook events (POST)
3If Image MessageIfChecks whether the message contains an image
4Fetch Image from LINE APIHTTP RequestDownloads image from LINE Content API
5Encode Image as Base64CodeConverts image binary to Base64 string
6Setup Gemini for Card DataGemini Chat ModelGemini 1.5 Flash model definition
7Extract Card Info with GeminiLLM ChainExtracts contact info from card image as JSON
8Parse Gemini Output DataCodeParses Gemini response into structured data
9Read Contacts from SheetsGoogle SheetsSearches existing records by email address
10If Contact ExistsIfChecks whether a duplicate record exists
11Append Contact to SheetsGoogle SheetsAppends new contact to Google Sheets
12Post New Contact to SlackHTTP RequestSends Slack notification for new contact
13Send Success Reply via LINEHTTP RequestSends registration confirmation via LINE
14Send Duplicate Reply via LINEHTTP RequestSends duplicate notification via LINE
15Respond Not Image to LINERespond to WebhookResponds to non-image messages
16Acknowledge OK WebhookRespond to WebhookReturns HTTP 200 on success
17Acknowledge Duplicate WebhookRespond to WebhookReturns HTTP 200 on duplicate

Total: 17 nodes (+ 8 Sticky Notes)


Sticky Note Compliance

#Sticky Note TitleColorRole
1Main Sticky Note (Overview)YellowWorkflow overview, How it works, Setup steps, Customization
2Configuration setupWhiteCovers credentials and config
3Webhook event handlingWhiteCovers LINE webhook reception and image check
4Image download and conversionWhiteCovers image fetch and Base64 encoding
5Card data extractionWhiteCovers Gemini extraction and parsing
6Duplicate check and contact savingWhiteCovers Sheets read/write and duplicate logic
7Messaging and webhook responseWhiteCovers Slack post, LINE replies, and webhook responses
8Gemini configurationWhiteCovers Gemini model setup

All sticky notes use H2 headings (## ) and follow n8n public guidelines.


Setup Guide

1. Create a LINE Messaging API channel

  1. Log in to LINE Developers Console
  2. Create a new provider (or select an existing one)
  3. Create a Messaging API channel
  4. Issue a long-lived Channel Access Token and copy it
  5. Set the Webhook URL after configuring n8n

2. Prepare Google Sheets

  1. Create a new spreadsheet
  2. Add the following headers in row 1:
ABCDEFGH
TimestampNameCompanyTitlePhoneEmailAddressLINE_UID
  1. Copy the spreadsheet ID from the URL (between /d/ and /edit)

3. Set up Slack Incoming Webhook

  1. Create a new app at Slack API
  2. Enable Incoming Webhooks
  3. Select a channel and copy the Webhook URL

4. Get a Google Gemini API key

  1. Go to Google AI Studio
  2. Create an API key
  3. Add it as a Google PaLM API credential in n8n

5. Configure the n8n workflow

  1. Import the workflow JSON into n8n
  2. Open the Set Configuration Parameters node and enter:
    • LINE_CHANNEL_ACCESS_TOKEN
    • GOOGLE_SHEET_ID
    • SLACK_WEBHOOK_URL
  3. Set up Google Sheets OAuth2 credentials
  4. Set up Gemini Chat Model credentials

6. Register the LINE Webhook URL

  1. Return to LINE Developers Console
  2. Enter the n8n Webhook URL
  3. Enable Webhook usage
  4. Disable auto-reply messages

7. Test

  1. Activate the workflow
  2. Send a business card photo to your LINE bot
  3. Confirm the contact is saved in Google Sheets
  4. Confirm the Slack notification is received
  5. Confirm the LINE confirmation message is received

Tags

ai gemini line google-sheets slack crm image-recognition automation

๐Ÿ”— Nodes Used

Google Sheets, HTTP Request, Webhook, Basic LLM Chain, Google Gemini Chat Model

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup