Extract business card contacts from LINE with Google Gemini and Notion

Go to Workflow
0 views
Built by Yasutaka Toshima Yasutaka Toshima
Created on July 28, 2026

Description

Quick overview
This workflow receives image messages from LINE, downloads the photo, uses Google Gemini to detect and extract business card details, and then saves the contact to a Notion CRM database before replying to the sender in LINE.

How it works
Receives a POST request from the LINE Messaging API webhook when a user sends a message.
Extracts the message type, image message ID, reply token, and LINE user ID from the webhook payload.
If the message is an image, downloads the image content from the LINE data API and converts it to Base64.
Sends the image to Google Gemini (Generative Language API) to determine whether it is a business card and to extract name, company, position, phone, and email as JSON.
Parses Gemini’s JSON response and branches based on whether the image is flagged as a business card.
If it is a business card, creates a new page in a Notion CRM database with the extracted fields and pushes a confirmation message to the user in LINE.
If it is not a business card, pushes a LINE message asking the user to resend a clearer business card photo.

Setup
Create a LINE Messaging API channel, enable webhooks, and add the n8n webhook URL from the LINE webhook trigger as your channel’s webhook URL.
In n8n, create an HTTP Header Auth credential for LINE (Authorization: Bearer ) and select it in the LINE image download and LINE push message requests.
Add a Google Gemini / PaLM (Google AI Studio) API credential for the Generative Language API used to classify and extract the business card fields.
Connect a Notion API credential and select your target CRM database ID, ensuring it has properties for Company, Position, Phone, and Email (and a title for the contact name).

Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Notion
n8n-nodes-base.notion