Skip to main content

Extract passport data with OpenAI OCR and generate QR codes

Workflow preview

Workflow preview
100%
Extract passport data with OpenAI OCR and generate QR codes preview
Open on n8n.io

1. Workflow Overview

Overview This workflow processes passport images submitted through a form, extracts structured data using OpenAI OCR, and generates QR codes with the extracted information. Results are displayed on...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.editimage, n8n-nodes-base.code, n8n-nodes-base.gmail, n8n-nodes-base.form

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ICTS Automation.

Original n8n.io source

1.1 Workflow description

Title
Extract passport data with OpenAI OCR and generate QR codes
Workflow name
Extract passport data with OpenAI OCR and generate QR codes

Overview

This workflow processes passport images submitted through a form, extracts structured data using OpenAI OCR, and generates QR codes with the extracted information. Results are displayed on the form completion page and sent via email.

The workflow reduces manual data entry and speeds up document processing workflows where passport information needs to be captured consistently. It works best with clear, front-facing passport images.

How it works

  1. User submits a form with one or more passport images
  2. Files are split and processed individually
  3. Each file is validated as an image and resized for OCR accuracy
  4. Image is converted to base64 and sent to OpenAI for data extraction
  5. Extracted fields are cleaned, standardized, and validated
  6. QR payload is generated from standardized data and converted to QR code image URL
  7. Results are aggregated into HTML summary
  8. Summary is displayed on form completion page and sent via email

Setup steps

  • Add OpenAI API credentials to the OCR request node
  • Connect your Gmail account for email delivery
  • Replace YOUR_EMAIL placeholder with recipient address
  • Test with 1–3 clear passport images

Customization

  • Modify OCR prompt to support other document types
  • Adjust QR payload format to match your system requirements

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - Loop Over images

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - OCR - openAI

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - If is image

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 5 - If has result

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 6 - Resize Image

Type / Role
n8n-nodes-base.editImage - editImage
Config choices
Version 1

Block 7 - Update imageBase64

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Data standardization

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 10 - Form

Type / Role
n8n-nodes-base.form - form
Config choices
Version 1

Block 11 - Grab image

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Prepare form

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Prepare QR url

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Extract passport data with OpenAI OCR and generate QR codes
Complexity advanced
Nodes 19
Categories Document Extraction, AI Summarization
Author ICTS Automation
Published 21 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12868/12868.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Extract passport data with OpenAI OCR and generate QR codes do?

Overview This workflow processes passport images submitted through a form, extracts structured data using OpenAI OCR, and generates QR codes with the extracted information. Results are displayed on...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.