Segment PDFs by table of contents with Gemini AI and Chunkr.ai
Needs changesWhat this workflow does
This AI workflow has 26 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Gemini Chat Model and Google Drive. It also calls api.chunkr.ai over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Download PDF from Google Drive (Google Drive): download
- Download PDF from URL (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Convert the PDF to base (Extract from File): extracts data from a file (binary to propery)
- Set File Name (Edit Fields (Set)): sets 3 fields: fileName, fileNameSnake, createdAt
- POST Chunkr Task (HTTP Request): calls api.chunkr.ai (POST)
- Wait: waits 10 seconds
- GET Chunkr Task (HTTP Request): calls an HTTP API
- Status is: (Switch): routes items into 3 branches
- Take beginning of Document to look for Table of contents (Code): runs custom JavaScript code
…plus 10 more steps. See the full node list below.
Services it uses
HTTP calls to: api.chunkr.ai
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Convert to/from binary data in Move Binary Data: replace with Convert to File or Extract from File.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Convert to/from binary data Move Binary Data | Convert to File or Extract from File |
Nodes used (18)
- Manual Trigger
n8n-nodes-base.manualTrigger - Switch
n8n-nodes-base.switch - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Edit Fields (Set)
n8n-nodes-base.set - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Code
n8n-nodes-base.code - Stop and Error
n8n-nodes-base.stopAndError - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - Wait
n8n-nodes-base.wait - AI Agent
@n8n/n8n-nodes-langchain.agent - HTML
n8n-nodes-base.html - Convert to/from binary data
n8n-nodes-base.moveBinaryData - Convert to File
n8n-nodes-base.convertToFile - Merge
n8n-nodes-base.merge
From the author
Intelligently Segment PDFs by Table of Contents This workflow empowers you to automatically process PDF documents, intelligently identify or generate a hierarchical Table of Contents (ToC), and then segment the entire document's content based on these ToC…