Skip to main content

OCR document processing from LINE/Gmail using GPT-4o to Google Workspace

Workflow preview

Workflow preview
100%
OCR document processing from LINE/Gmail using GPT-4o to Google Workspace preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who this is for Users who frequently receive images or documents via LINE or email Teams needing automatic OCR + AI summarization Anyone who wants hands free document processing and structured stor...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.gmailtrigger, n8n-nodes-base.set, n8n-nodes-base.merge, n8n-nodes-base.googledrive, n8n-nodes-base.code, n8n-nodes-base.gmail, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by SOLOVIEVA ANNA.

Original n8n.io source

1.1 Workflow description

Title
OCR document processing from LINE/Gmail using GPT-4o to Google Workspace
Workflow name
OCR document processing from LINE/Gmail using GPT-4o to Google Workspace

Who this is for

Users who frequently receive images or documents via LINE or email

Teams needing automatic OCR + AI summarization

Anyone who wants hands-free document processing and structured storage

How it works

Triggers: LINE Webhook and Gmail IMAP Trigger capture incoming messages or emails.

Source Tagging: Inputs are tagged as LINE or EMAIL for later branching.

File Handling: Files are uploaded to Google Drive and converted for analysis.

OCR: An AI vision model extracts all readable text from the document image.

AI Summarization: A text model produces a concise summary.

Logging: The summary is appended to Google Sheets for record-keeping.

Email Drafting: A Gmail Draft is generated containing the OCR text and summary.

How to set up

Connect your LINE, Gmail, OpenAI, and Google Drive/Sheets credentials.

Update folder IDs, sheet names, and authentication fields as needed.

Optional: customize summarization instructions.

Customization ideas

Add translation or classification steps

Modify output format for Slack/Notion

Store files in date-based Drive folders

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - LINE Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Gmail IMAP Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 3 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Tag Source - LINE

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Tag Source - EMAIL

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - Merge Triggers

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 7 - Upload to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - Convert to Base64

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Create Gmail Draft

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 10 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Append row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - HTTP Request2

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 15 - Message a model

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 16 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 18 - Sticky Note - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note - Triggers & Configuration

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note - Source tagging & merge

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note - File upload & OCR

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note - Summaries & outputs

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow OCR document processing from LINE/Gmail using GPT-4o to Google Workspace
Complexity advanced
Nodes 22
Categories Document Extraction, AI Summarization
Author SOLOVIEVA ANNA
Published 02 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11413/11413.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does OCR document processing from LINE/Gmail using GPT-4o to Google Workspace do?

Who this is for Users who frequently receive images or documents via LINE or email Teams needing automatic OCR + AI summarization Anyone who wants hands free document processing and structured stor...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.