Skip to main content

Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail

Workflow preview

Workflow preview
100%
Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick overview Upload any PDF through a form and this workflow extracts the full text using CoreNexis OCR, generates a structured 5 section summary with GPT 4.1 mini, converts it into a branded HTM...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.formtrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail
Workflow name
Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail

Quick overview

Upload any PDF through a form and this workflow extracts the full text using CoreNexis OCR, generates a structured 5-section summary with GPT-4.1-mini, converts it into a branded HTML email with GPT-4o-mini, and delivers it to your inbox automatically.

How it works

  1. User fills a form with their name, email address, and PDF file upload — no login or account required.
  2. A code step identifies the uploaded PDF binary and extracts user metadata for use throughout the workflow.
  3. The PDF is submitted to the CoreNexis OCR API which extracts all text from the document asynchronously and returns a job ID.
  4. After an initial 4-second wait, the workflow polls the CoreNexis status endpoint. If the job is still processing, it waits 1 minute and polls again. This loop continues automatically until the OCR job reports completed.
  5. Once completed, the extracted text file is downloaded from the CoreNexis output URL.
  6. GPT-4.1-mini reads the full extracted text and writes a structured 5-section Markdown summary: Document Overview, Key Points, Important Numbers and Dates, Action Items, and Executive Summary.

Setup

  1. Get your CoreNexis API key from api.corenexis.com. Open node 3. HTTP — CoreNexis OCR Submit and replace YOUR_CORENEXIS_API_KEY with your actual key.
  2. Open node 6. HTTP — Poll OCR Status and replace YOUR_CORENEXIS_API_KEY again — the same key must appear in both nodes 3 and 6
  3. Open the OpenAI — GPT-4.1-mini Model node and connect your OpenAI API credential.

Requirements

  • Active n8n instance (self-hosted or cloud)
  • CoreNexis account with API access — get your key at api.corenexis.com
  • OpenAI account with access to GPT-4.1-mini and GPT-4o-mini
  • Gmail account connected via OAuth2 for sending summary emails

Customization

  • Change the summary structure — edit the system prompt in node 13. AI Agent — Generate Document Summary to add, remove, or rename any of the 5 sections based on your document type
  • Change the email branding — edit the system prompt in node 15. AI Agent — Generate HTML Email to replace the CoreNexis colors (#1a1a2e and #e94560) with your own brand colors
  • Add a Google Sheets log — after node 17. Gmail — Send Summary Email, add a Google Sheets append step to record the user name, email, file name, and timestamp for every processed document
  • Support multiple languages — in node 3. HTTP — CoreNexis OCR Submit, change lang=eng to any supported CoreNexis language code to process documents in other languages
  • Adjust the retry interval — in node 9. Wait — 1 Minute Retry, change the wait duration to 2 or 3 minutes for very large PDFs that take longer to process

Additional info

The CoreNexis API key appears in two separate steps — node 3. HTTP — CoreNexis OCR Submit and node 6. HTTP — Poll OCR Status. You must replace YOUR_CORENEXIS_API_KEY in both. Missing either one will cause the workflow to fail.

The OCR polling loop runs automatically until the job status equals completed. For large PDFs this may take several minutes. The workflow handles this without any manual intervention.

If the OCR job returns a failed or unknown status, the workflow stops at node 10. IF — OCR Completed? without sending an email. Check the CoreNexis dashboard for the job error details.

Node 16. Code — Extract HTML includes a built-in fallback — if GPT-4o-mini returns invalid or empty HTML, the workflow automatically generates a plain formatted HTML email from the Markdown summary so the user always receives something.

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 - Overview

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

Block 2 - Section — Form Submission and PDF Data Preparation

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

Block 3 - Section — CoreNexis OCR Submit and Job ID Extract

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

Block 4 - Section — OCR Status Polling Loop

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

Block 5 - Section — Text Download and Agent Preparation

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

Block 6 - Section — GPT-4.1-mini Document Summary Generation

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

Block 7 - Section — GPT-4o-mini HTML Email Build and Gmail Send

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

Block 8 - 1. Form — PDF Upload

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

Block 9 - 2. Code — Prepare PDF Data

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

Block 10 - 3. HTTP — CoreNexis OCR Submit

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

Block 11 - 4. Code — Get Job ID

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

Block 12 - 5. Wait — 4 Seconds

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 13 - 6. HTTP — Poll OCR Status

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

Block 14 - 7. Code — Merge Status

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

Block 15 - 8. IF — Still Processing?

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

Block 16 - 9. Wait — 1 Minute Retry

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 17 - 10. IF — OCR Completed?

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

Block 18 - 11. HTTP — Download Extracted Text

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

Block 19 - 12. Code — Prep Text for Agent

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

Block 20 - 13. AI Agent — Generate Document Summary

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 21 - OpenAI — GPT-4.1-mini Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 22 - 14. Code — Extract Summary

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

Block 23 - 15. AI Agent — Generate HTML Email

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 24 - OpenAI — GPT-4o-mini Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail
Complexity advanced
Nodes 26
Categories Document Extraction, AI Summarization
Author isaWOW
Published 26 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15956/15956.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 Send PDF document summaries with CoreNexis OCR, GPT-4.1-mini, GPT-4o-mini and Gmail do?

Quick overview Upload any PDF through a form and this workflow extracts the full text using CoreNexis OCR, generates a structured 5 section summary with GPT 4.1 mini, converts it into a branded HTM...

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.