Extract text from images with Telegram Bot & OCR Tesseractjs
Description This n8n workflow enables users to send an image to a Telegram bot and receive the extracted text using Tesseract OCR (via the n8n-nodes-tesseractjs Community Node). It's a quick and straightforward way to convert images into readable text directly through chat.
How it Works
-
The workflow listens for new image messages coming in via the Telegram bot.
-
Once an image is received, it downloads the image file from Telegram (which initially arrives as application/octet-stream).
-
The image data, now properly identified, is then sent to the Tesseract OCR node to extract the text.
-
Finally, the recognized text is sent back as a reply to the Telegram user.
Setup Steps
-
Install Community Node: Ensure you have installed n8n-nodes-tesseractjs in your n8n instance.
-
Connect Telegram Bot: Configure the Telegram Trigger node with your Telegram bot.
-
Bot Token: Add your Telegram bot token to the Send Message node to send replies.
-
Deploy & Test: Activate (deploy) the workflow and send an image to your Telegram bot to test.
Extract Text from Images with Telegram Bot (OCR Tesseract.js)
This n8n workflow creates a Telegram bot that can extract text from images using OCR (Optical Character Recognition) powered by Tesseract.js. Simply send an image to the bot, and it will respond with the extracted text.
What it does
- Listens for Telegram Messages: The workflow is triggered when a message is sent to your configured Telegram bot.
- Identifies Image Attachments: It checks if the incoming Telegram message contains an image attachment.
- Downloads Image: If an image is present, it downloads the image file.
- Performs OCR: It then uses Tesseract.js (via a Code node) to perform OCR on the downloaded image, extracting any text found.
- Sends Extracted Text to Telegram: Finally, the extracted text is sent back to the user via the Telegram bot.
Prerequisites/Requirements
- n8n Instance: A running instance of n8n.
- Telegram Bot: A Telegram bot token (obtained from BotFather).
- Tesseract.js (via Code Node): The workflow uses a Code node to implement Tesseract.js. This means your n8n environment needs to support running custom JavaScript code that can utilize external libraries (though Tesseract.js is typically self-contained for browser/Node.js environments).
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, click on "Workflows" in the left sidebar.
- Click "New" -> "Import from JSON" and paste the workflow JSON or upload the file.
- Configure Telegram Credentials:
- Locate the "Telegram Trigger" and "Telegram" nodes.
- Click on the "Credential" field for each and select "Create New Credential".
- Choose "Telegram API" and enter your Telegram Bot Token.
- Save the credential.
- Activate the Workflow:
- Once the credentials are set up, activate the workflow by toggling the "Active" switch in the top right corner of the workflow editor.
- Interact with the Bot:
- Open your Telegram app and find your bot.
- Send an image to the bot.
- The bot will process the image and respond with the extracted text.
Note on Tesseract.js: The "Code" node is responsible for the OCR. Ensure that the JavaScript code within this node is correctly configured to use Tesseract.js and handle image data. You might need to install tesseract.js in your n8n environment if it's not already available for the Code node to use.
Related Templates
AI multi-agent executive team for entrepreneurs with Gemini, Perplexity and WhatsApp
This workflow is an AI-powered multi-agent system built for startup founders and small business owners who want to automate decision-making, accountability, research, and communication, all through WhatsApp. The βvirtual executive team,β is designed to help small teams to work smarter. This workflow sends you market analysis, market and sales tips, It can also monitor what your competitors are doing using perplexity (Research agent) and help you stay a head, or make better decisions. And when you feeling stuck with your start-up accountability director is creative enough to break the barrier π― Core Features π§βπΌ 1. President (Super Agent) Acts as the main controller that coordinates all sub-agents. Routes messages, assigns tasks, and ensures workflow synchronization between the AI Directors. π 2. Sales & Marketing Director Uses SerpAPI to search for market opportunities, leads, and trends. Suggests marketing campaigns, keywords, or outreach ideas. Can analyze current engagement metrics to adjust content strategy. π΅οΈββοΈ 3. Business Research Director Powered by Perplexity AI for competitive and market analysis. Monitors competitor moves, social media engagement, and product changes. Provides concise insights to help the founder adapt and stay ahead. β° 4. Accountability Director Keeps the founder and executive team on track. Sends motivational nudges, task reminders, and progress reports. Promotes consistency and discipline β key traits for early-stage success. ποΈ 5. Executive Secretary Handles scheduling, email drafting, and reminders. Connects with Google Calendar, Gmail, and Sheets through OAuth. Automates follow-ups, meeting summaries, and notifications directly via WhatsApp. π¬ WhatsApp as the Main Interface Interact naturally with your AI team through WhatsApp Business API. All responses, updates, and summaries are delivered to your chat. Ideal for founders who want to manage operations on the go. βοΈ How It Works Trigger: The workflow starts from a WhatsApp Trigger node (via Meta Developer Account). Routing: The President agent analyzes the incoming message and determines which Director should handle it. Processing: Marketing or sales queries go to the Sales & Marketing Director. Research questions are handled by the Business Research Director. Accountability tasks are assigned to the Accountability Director. Scheduling or communication requests are managed by the Secretary. Collaboration: Each sub-agent returns results to the President, who summarizes and sends the reply back via WhatsApp. Memory: Context is maintained between sessions, ensuring personalized and coherent communication. π§© Integrations Required Gemini API β for general intelligence and task reasoning Supabase- for RAG and postgres persistent memory Perplexity API β for business and competitor analysis SerpAPI β for market research and opportunity scouting Google OAuth β to connect Sheets, Calendar, and Gmail WhatsApp Business API β for message triggers and responses π Benefits Acts like a team of tireless employees available 24/7. Saves time by automating research, reminders, and communication. Enhances accountability and strategy consistency for founders. Keeps operations centralized in a simple WhatsApp interface. π§° Setup Steps Create API credentials for: WhatsApp (via Meta Developer Account) Gemini, Perplexity, and SerpAPI Google OAuth (Sheets, Calendar, Gmail) Create a supabase account at supabase Add the credentials in the corresponding n8n nodes. Customize the system prompts for each Director based on your startupβs needs. Activate and start interacting with your virtual executive team on WhatsApp. Use Case You are a small organisation or start-up that can not afford hiring; marketing department, research department and secretar office, then this workflow is for you π‘ Need Customization? Want to tailor it for your startup or integrate with CRM tools like Notion or HubSpot? You can easily extend the workflow or contact the creator for personalized support. Consider adjusting the system prompt to suite your business
Automated YouTube video uploads with 12h interval scheduling in JST
This workflow automates a batch upload of multiple videos to YouTube, spacing each upload 12 hours apart in Japan Standard Time (UTC+9) and automatically adding them to a playlist. βοΈ Workflow Logic Manual Trigger β Starts the workflow manually. List Video Files β Uses a shell command to find all .mp4 files under the specified directory (/opt/downloads/εθ―ε‘/A1-A2). Sort and Generate Items β Sorts videos by day number (dayXX) extracted from filenames and assigns a sequential order value. Calculate Publish Schedule (+12h Interval) β Computes the next rounded JST hour plus a configurable buffer (default 30 min). Staggers each videoβs scheduled time by order Γ 12 hours. Converts JST back to UTC for YouTubeβs publishAt field. Split in Batches (1 per video) β Iterates over each video item. Read Video File β Loads the corresponding video from disk. Upload to YouTube (Scheduled) β Uploads the video privately with the computed publishAtUtc. Add to Playlist β Adds the newly uploaded video to the target playlist. π Highlights Timezone-safe: Pure UTC β JST conversion avoids double-offset errors. Sequential scheduling: Ensures each upload is 12 hours apart to prevent clustering. Customizable: Change SPANHOURS, BUFFERMIN, or directory paths easily. Retry-ready: Each upload and playlist step has retry logic to handle transient errors. π‘ Typical Use Cases Multi-part educational video series (e.g., A1βA2 English learning). Regular content release cadence without manual scheduling. Automated YouTube publishing pipelines for pre-produced content. --- Author: Zane Category: Automation / YouTube / Scheduler Timezone: JST (UTC+09:00)
Daily cash flow reports with Google Sheets, Slack & Email for finance teams
Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generates a comprehensive daily report. The workflow sends multi-channel notifications via email and Slack, ensuring finance professionals stay updated with real-time financial insights. πΈπ§ Key Features Daily automation keeps cash flow tracking current. Analyzes inflows and outflows for actionable insights. Multi-channel alerts enhance team visibility. Logs maintain a detailed record in Google Sheets. Workflow Process The Every Day node triggers a daily check at a set time. Get Cash Flow Data retrieves financial data from a Google Sheet. Analyze Inflows & Outflows processes the data to identify trends and totals. Validate Records ensures all entries are complete and accurate. If records are valid, it branches to: Sends Email Daily Report to finance team members. Send Slack Alert to notify the team instantly. Logs to Sheet appends the summary data to a Google Sheet for tracking. Setup Instructions Import the workflow into n8n and configure Google Sheets OAuth2 for data access. Set the daily trigger time (e.g., 9:00 AM IST) in the "Every Day" node. Test the workflow by adding sample cash flow data and verifying reports. Adjust analysis parameters as needed for specific financial metrics. Prerequisites Google Sheets OAuth2 credentials Gmail API Key for email reports Slack Bot Token (with chat:write permissions) Structured financial data in a Google Sheet Google Sheet Structure: Create a sheet with columns: Date Cash Inflow Cash Outflow Category Notes Updated At Modification Options Customize the "Analyze Inflows & Outflows" node to include custom financial ratios. Adjust the "Validate Records" filter to flag anomalies or missing data. Modify email and Slack templates with branded formatting. Integrate with accounting tools (e.g., Xero) for live data feeds. Set different trigger times to align with your financial review schedule. Discover more workflows β Get in touch with us