๐Ÿ”ฌ Create a searchable document archive with Telegram, Drive, OCR and Airtable

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

Description

This n8n workflow receives files sent in a Telegram chat, uploads them to Google Drive, extracts text using OCR (for images and PDFs), and stores the extracted content in Airtable for quick search and retrieval. Users can later search through documents using a Telegram /search command.

Key Features

Use Cases

Workflow Steps

StepActionDescription
1Telegram TriggerDetects incoming docs/images or /search command
2Filter File or SearchRoutes based on whether message has file or search command
3Extract MetadataReads file info such as name, MIME type, user
4Download FileDownloads file via Telegram API
5Upload to DriveSaves file in Google Drive
6OCR CheckDetermines if file supports OCR
7Google OCRRuns OCR for images/PDFs
8Extract TextPulls text output from OCR
9Merge OCR TextCombines file data + text
10Save to AirtableIndexes with metadata + text
11Success ReplySends link + success message
12/search FlowParse search query
13Airtable SearchFull-text search for records
14Send ResultsSends matches to Telegram
15Error HandlerNotifies user on failure

Input Formats

File Messages Supported

Search Command

/search keyword

Example:

/search invoice

Output

After Upload:

โœ… File saved & indexed successfully!
๐Ÿ”— Drive Link: <link>

Returns structured result:

Data Stored in Airtable

FieldDescription
File NameOriginal name
File LinkGoogle Drive link
MIME TypeFile type
Telegram UserSender info
OCR TextExtracted searchable text
Uploaded DateTimestamp

Technical Requirements

Benefits

Enhancement Ideas

Status

โœ… Ready for production โœ… Handles images, PDFs, and files โœ… End-to-end automation ๐Ÿ›  Optional: add more AI enrichment later

๐Ÿ”— Nodes Used

Airtable, HTTP Request, Telegram, Telegram Trigger, Google Drive

๐Ÿ“ฅ Import

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

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