Image-Based Data Extraction API using Gemini AI
Configured with Extract From File, HTTP Request, Respond To Webhook, Webhook. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Web / API
- Transform
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Webhook | Trigger | Webhook | See node parameters |
| Respond to Webhook | Web / API | Respond To Webhook | See node parameters |
| Get image from URL | Web / API | HTTP Request | See node parameters |
| Call Gemini API (Flash Lite) with Image | Web / API | HTTP Request | POST |
| Edit fields to output required data alone | Transform | Edit Fields | See node parameters |
| Transform image to base64 | Transform | Extract From File | binaryToPropery |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
googlePalmApi
Workflow notes
Sample API Call (cURL)
Sample API Call (cURL)
curl --request GET \
--url https://your_domain.com/webhook/data-extractor \
--data '{
"image_url":"https://www.immihelp.com/nri/images/sample-pan-card-front.jpg",
"Requirement":"extract the details from the image",
"properties": {
"PAN Number": {
"type": "string"
},
"Name": {
"type": "string"
},
"Date of Birth": {
"type": "string"
},
"Valid": {
"type": "boolean"
}
}
}'
Sample Output
Sample Output
{
"result": "{\"Date of Birth\":\"23/11/1974\",\"Name\":\"RAHUL GUPTA\",\"PAN Number\":\"ABCDE1234F\",\"Valid\":true}"
}
Convert the workflow into an Endpoint
Convert the workflow into an Endpoint
This n8n workflow provides a ready-to-use API endpoint for extracting structured data from images. The API takes an image URL as input, processes it using an AI-powered OCR model, and returns relevant extracted details in a structured JSON format.
- The workflow converts the image to base64 before processing.
- It utilizes an AI-powered model (Gemini API) for text extraction.
- The output is formatted to include only the required fields.
- You can customize the extraction criteria by modifying the request parameters.
- Supports integration with various applications for automated data entry and processing.
It can be used for various use cases, such as:
- Document OCR (ID cards, invoices, receipts)
- Text Extraction from Images
- Automated Form Processing
- Business Card Data Extraction
Simply send a GET request with an image URL, define the extraction requirements, and receive structured JSON data in response.
Image-Based Data Extraction API using Gemini AI
Image-Based Data Extraction API using Gemini AI
Purpose and structure
This folder contains the Image-Based Data Extraction API using Gemini AI workflow. Its executable nodes use extractFromFile, httpRequest, respondToWebhook, set, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Webhook
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Webhook/1770_Webhook_Extractfromfile_Automation_Webhook.json MIT; preserve source notices.