Auto OCR, AI Summary, Google Sheets Logging, and Gmail Notification - n8n Workflow

Use this comprehensive n8n workflow to automate Optical Character Recognition (OCR) on images uploaded to Google Drive, summarize the content with OpenRouter AI, and log results to Google Sheets, completing the loop with a Gmail notification. Perfect for digitizing documents.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Academics and Students: Users who need to quickly digitize and summarize lecture notes or textbook pages.

  • Administrative Professionals: Those required to process and archive printed reports or receipts uploaded as image files.

  • Automation Enthusiasts: Anyone looking for advanced n8n templates that combine cloud storage, external APIs (OCR), and LLMs (AI summarization).

  • Technical Users: Users needing a robust n8n workflow example demonstrating binary data handling and conditional AI processing.

Overview

Digitizing large volumes of image-based documents (like scanned reports or photographs of text) is a time-consuming manual process. This sophisticated n8n workflow provides a seamless solution by chaining together file detection, OCR extraction, advanced AI summarization, and data logging. The primary goal of this n8n automation is efficiency: once an image is dropped into a monitored Google Drive folder, the entire process—from text extraction (using OCR.space) and summarization (via OpenRouter AI) to logging in Google Sheets—runs automatically. This is a powerful demonstration of how an n8n node can manage complex, multi-service operations.

How it Works

This powerful n8n workflow initiates every time a new image file is detected in a specified Google Drive folder.


  1. Trigger and Download: The Google Drive New File Trigger1 (a specific n8n trigger) monitors the folder. Once a file is detected, the Download Image File1 n8n node downloads the binary data.

  2. OCR Processing: The binary data is sent to the Extract Text with OCR.space1 HTTP Request node. This node is configured to perform Japanese (jpn) OCR on the image.

  3. Data Preparation: A Code n8n node (Format OCR Result & Check for Empty1) cleans the extracted raw text, removing extraneous line breaks and multiple spaces. It also captures the original filename.

  4. AI Summarization: The cleaned text is passed to the Generate Summary with OpenRouter AI1 n8n node, which uses the OpenRouter language model to generate a concise summary based on a specific prompt.

  5. Logging Results: The AI summary, along with the processing date and original filename, is appended as a new row in a target Google Sheets document via the Append row in sheet1 n8n node.

  6. Notification: Finally, the Send Completion Notification via Gmail1 n8n node sends a detailed email notification to the user, confirming that the OCR and summarization process is complete and including the final summary.

Installation Guide

To deploy this n8n workflow and start automating, follow these setup steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it directly into your n8n instance.

  2. Connect Credentials: You will need to set up or select existing credentials for:

Google Drive (for the n8n trigger and download node).
OpenRouter (or the specific language model connection used).
Google Sheets.
Gmail.

  1. Configure the Trigger: In the Google Drive New File Trigger1 n8n trigger, specify the exact folder ID in your Google Drive that you wish to monitor for new images.

  2. Set OCR API Key: In the Extract Text with OCR.space1 n8n node (HTTP Request), replace the placeholder value (APIKEY) with your actual OCR.space API key.

  3. Define Output Destinations: Update the Append row in sheet1 n8n node with the Document ID and specific Sheet Name where the data should be logged.

  4. Update Gmail Recipient: In the Send Completion Notification via Gmail1 n8n node, ensure the Send To email address is correct for receiving notifications.

Node Details

Google Drive New File Trigger1 (n8n Trigger):
Function: Starts the n8n workflow upon the creation of a new file (image) in a predefined Google Drive folder. It polls for changes every minute.
Key Configuration: Configured to watch a specific folder ID (1jTs0NNXMFTcChRq0C1KEoARVdIOOjQ1r).
Download Image File1 (Google Drive n8n node):
Function: Downloads the file identified by the trigger event, storing the data in the data binary property for subsequent OCR processing.
Extract Text with OCR.space1 (HTTP Request n8n node):
Function: Sends the binary image data to the OCR.space API for text extraction. This is a critical step in the n8n automation.
Key Configuration: POST request to /parse/image, Content-Type is set to multipart-form-data, and the request includes the apikey, language (jpn), and the binary file data.
Format OCR Result & Check for Empty1 (Code n8n node):
Function: Processes the raw JSON output from OCR.space. It cleans the text by normalizing whitespace and extracts metadata like the filename, preparing it for the AI summarization step.
Generate Summary with OpenRouter AI1 (Langchain Agent n8n node):
Function: Takes the cleaned extracted text and uses the connected OpenRouter LLM (OpenRouter Chat Model1 n8n node) to generate a short, concise summary.
Key Configuration: Uses an inline prompt instructing the AI to summarize the input text.
Append row in sheet1 (Google Sheets n8n node):
Function: Logs the structured output (date, filename, summary) into the designated Google Sheet.
Send Completion Notification via Gmail1 (Gmail n8n node):
* Function: Sends an email notification detailing the successful execution of the n8n workflow, including the filename and the AI-generated summary.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Tsubasa Shukuwa
Tsubasa Shukuwa

Featured*