A simple web app that extracts text from uploaded images. It connects a React + Ant Design frontend to either:
- an n8n cloud workflow (recommended), or
- a lightweight Node.js + Express backend API (optional for local/offline flows).
text-extract-app/
├── backend/
│ ├── index.js # Express API (optional)
│ └── package.json
├── frontend/
│ ├── public/
│ └── src/
│ ├── App.js # Upload UI; calls n8n webhook by default
│ ├── App.css
│ └── index.js
├── n8n text extract.json # n8n workflow export
├── .gitignore
└── README.md
- Frontend (
frontend/src/App.js) lets users select an image and sends it to a processing endpoint. - By default, the endpoint is an n8n Cloud webhook. The workflow:
- Receives the uploaded file in a webhook node
- Converts file to inline data
- Calls Gemini via HTTP request to extract text
- Optionally appends results into Google Sheets
- Responds to the webhook with extracted text
- Optionally, a local Express backend (
backend/index.js) can accept uploads and return a mock or custom result. This is useful for offline/local testing.
Live demo: https://text-extract-app.vercel.app/
- File:
n8n text extract.json(import this into your n8n instance) - Webhook path: defined inside the workflow (e.g.
.../webhook/3b9855...) - Expected request:
- Method: POST
- Body: multipart/form-data with the image file
- Response shape: The frontend expects
res.data.candidates[0].content.parts[0].textto contain the extracted text when using the Gemini HTTP node from the provided workflow.
Security tip: set your n8n workflow to production URL and consider adding authentication if exposing publicly.
cd frontend
npm install
npm startRuns at: http://localhost:3000
The default App.js posts directly to your n8n cloud webhook URL. You do not need the backend for this path.
cd backend
npm install
# You can pick a free port if 5000 is occupied
PORT=5051 npm startRuns at: http://localhost:PORT (defaults to 5000; uses process.env.PORT if set).
Current upload endpoint in backend/index.js:
POST /api/upload (multipart/form-data)
field name: image
returns: { success: true, data: { text: "..." } }
If you switch the frontend to call the local backend, update frontend/src/App.js to:
- use
formData.append('image', file) - post to
http://localhost:<PORT>/api/upload - read
res.data.data.textfor the result
Frontend (React) is designed to deploy on Vercel:
- Connect the GitHub repo in Vercel → Add New Project → select this repo
- Root Directory:
frontend/ - Build settings: auto-detected (Create React App / Vite)
- Environment Variables (optional): add any needed runtime config
- After deploy, Vercel provides a public URL
If you want to deploy backend too, consider:
- Vercel Serverless Functions (migrate Express routes) or
- Dedicated hosts (Render, Railway, Fly.io, etc.)
Using n8n cloud means you typically only deploy the frontend to Vercel.
- Frontend endpoint: edit
frontend/src/App.jsto point to your n8n webhook or local API - Backend port: set
PORTenv var (e.g.,PORT=5051) - n8n: import the provided workflow, set API keys and Google credentials inside n8n
Created by Zichen Zhao — for demo, learning, and personal use.