Templates / Segment PDFs by table of contents with Gemini AI and Chunkr.ai

Segment PDFs by table of contents with Gemini AI and Chunkr.ai

Needs changes

by Lukas Kunhardt · 749 views · created 2025-06-05 · Document Extraction, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Convert to/from binary data. 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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).

  1. Download PDF from Google Drive (Google Drive): download
  2. Download PDF from URL (HTTP Request): calls an HTTP API
  3. Merge: merges the data from its input branches
  4. Convert the PDF to base (Extract from File): extracts data from a file (binary to propery)
  5. Set File Name (Edit Fields (Set)): sets 3 fields: fileName, fileNameSnake, createdAt
  6. POST Chunkr Task (HTTP Request): calls api.chunkr.ai (POST)
  7. Wait: waits 10 seconds
  8. GET Chunkr Task (HTTP Request): calls an HTTP API
  9. Status is: (Switch): routes items into 3 branches
  10. 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

Google Gemini Chat ModelGoogle Drive

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.0Replace with
Convert to/from binary data
Move Binary Data
Convert to File or Extract from File

Nodes used (18)

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…

Excerpt from Lukas Kunhardt's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.