DocsNodesDataDocument Handling Node

Document Handling Node

Loading node sections...

Overview

Working with PDFs in a flow used to mean piecing together multiple nodes just to merge a couple of files or pull out a few pages. The Document Handling node does it in one step: pick what you want done, point it at your documents, and get a ready-to-use file back.

It covers 14 operations across five types: Merge, Split, Pages, Bookmarks, and Metadata. You pick a Type first, then the specific Operation for that type, so you only ever see the fields relevant to what you’re doing instead of one long list of every option at once.

Document Handling node in a flow

Node Type Information

TypeDescriptionStatus
Batch TriggerStarts the flow on a schedule or batch event. Ideal for periodic data processing.❌ False
Event TriggerStarts the flow based on external events (e.g., webhook, user interaction).❌ False
ActionExecutes a task or logic as part of the flow (e.g., API call, transformation).âś… True

This node is an **Action** node that merges, splits, and edits pages, bookmarks, and metadata in PDF documents.

Features

Key Functionalities
  1. Merge: Combine multiple PDFs into one, with optional per-document page ranges and bookmark preservation.
  2. Split: Break a PDF apart every N pages, at specific page numbers, or into one file per page.
  3. Pages: Extract, delete, insert blank pages, insert pages from another document, or reorder/duplicate pages.
  4. Bookmarks: List, set, or remove a PDF’s bookmarks.
  5. Metadata: Get or set document metadata, title, author, subject, creator, and keywords.
Benefits
  1. One Node, Not a Chain: Handle common PDF editing tasks without wiring together multiple nodes.
  2. Only Relevant Fields: The two-step Type → Operation picker keeps the panel focused on what you’re actually configuring.
  3. Safe by Default: Each run executes in its own isolated container, and documents flow in and out as URLs rather than inline data.
  4. Predictable I/O: Every operation that produces a file returns the same shape, a presigned URL plus a durable storage key, so downstream nodes always know what to expect.

What Can You Build?

  • Merge a cover page, generated report, and appendix into a single client-facing PDF.
  • Split a large scanned document into per-page or per-chapter files for downstream processing.
  • Strip a fixed cover page or insert a signed addendum into an existing contract.
  • Read or stamp document metadata (title, author, keywords) as part of a publishing pipeline.
  • Preserve or rebuild a PDF’s bookmark outline when reassembling documents.

How It Works

Drop the node into a flow, provide your document URL(s), and run it. Each run spins up in its own isolated container.

  • Inputs are URLs only. Base64 input is rejected with a message pointing you at a URL instead, this keeps whole PDF files out of your workflow state and run logs.
  • Outputs that produce a file return a presigned URL and a durable storage key, ready to pass to the next step or store for later.
  • List Bookmarks and Get Metadata return their data directly instead of a file.
⚠️

Two things worth knowing before you rely on this node:

Password-protected PDFs are rejected. The node can’t process an encrypted file it can’t open. Get Metadata is the one exception, it can still inspect an encrypted document without the password.

Some operations (Extract, Insert, and ranged Merge) can drop annotations, outlines, or form fields from the source PDF. This is a limitation of the underlying processing, not a bug, the node UI calls it out directly so it isn’t a surprise.

Setup

1. Merge

Combines multiple PDFs into a single document.

Configuration Reference

ParameterDescriptionRequiredExample
DocumentsThe PDF files to merge, in order. Accepts URLs.Yes["{{node1.output.url}}", "{{node2.output.url}}"]
Page RangesOptional per-document page ranges. Leave empty to include a document in full.No1-3
Preserve BookmarksIf enabled, carries each source document’s bookmarks into the merged output.Notrue

Output

  • files: an array with one entry: { url, key, pageCount } for the merged document.

2. Split

Breaks a single PDF into multiple files.

Configuration Reference

ParameterApplies toDescriptionRequiredExample
DocumentAllThe PDF to split. Accepts a URL.Yes{{node1.output.url}}
OperationAllWhich split mode to use.YesAt Specific Page Numbers
Pages per FileEvery N PagesNumber of pages per output file.Yes, for this operation5
PagesAt Specific Page NumbersPage numbers to split at.Yes, for this operation3, 7, 12

Every Page needs no additional field, each page becomes its own file.

Output

  • files: an array with one entry per resulting file: { url, key, pageCount }.

3. Pages

Adds, removes, or reorders pages within a document.

Configuration Reference

ParameterApplies toDescriptionRequiredExample
DocumentAllThe PDF to modify. Accepts a URL.Yes{{node1.output.url}}
OperationAllExtract, Delete, Insert Blank Pages, Insert From Document, or Reorder/Duplicate.YesExtract
PagesExtract, DeletePage numbers or ranges to extract or delete.Yes, for these operations1-2, 5
PositionInsert Blank Pages, Insert From DocumentWhere to insert the new pages.Yes, for these operationsafter page 3
CountInsert Blank PagesNumber of blank pages to insert.Yes, for this operation1
Source DocumentInsert From DocumentURL of the PDF to pull pages from.Yes, for this operation{{node1.output.url}}
Source PagesInsert From DocumentPage numbers or ranges to pull from the source document.Yes, for this operation1-2
Page OrderReorder/DuplicateThe new page order. Repeat a page number to duplicate it.Yes, for this operation1, 1, 2, 4, 3
⚠️

Extract and Insert can drop annotations, outlines, and form fields from the affected pages.

Output

  • files: an array with one entry: { url, key, pageCount } for the resulting document.

4. Bookmarks

Reads or modifies a PDF’s bookmark outline.

Configuration Reference

ParameterApplies toDescriptionRequiredExample
DocumentAllThe PDF to read or modify. Accepts a URL.Yes{{node1.output.url}}
OperationAllList, Set, or Remove.YesSet
Bookmarks (JSON)SetThe bookmark outline to write, as JSON.Yes, for this operation[{"title": "Chapter 1", "page": 1}]
Replace Existing BookmarksSetIf enabled, replaces the document’s entire bookmark outline. If disabled, adds to the existing outline.Notrue

Output

  • List: bookmarks, the document’s current bookmark outline.
  • Set / Remove: files, an array with one entry: { url, key, pageCount } for the updated document.

5. Metadata

Reads or writes a PDF’s document metadata.

Configuration Reference

ParameterApplies toDescriptionRequiredExample
DocumentAllThe PDF to read or modify. Accepts a URL.Yes{{node1.output.url}}
OperationAllGet or Set.YesSet
TitleSetDocument title.NoQ3 Board Report
AuthorSetDocument author.NoFinance Team
SubjectSetDocument subject.NoQuarterly Results
CreatorSetCreating application or person.NoLamatic
KeywordsSetSearch keywords for the document.Nofinance, quarterly, board

Output

  • Get: metadata, an object with the document’s current title, author, subject, creator, and keywords. Works even on password-protected PDFs, since reading metadata doesn’t require decrypting content.
  • Set: files, an array with one entry: { url, key, pageCount } for the updated document.

Troubleshooting

Common Issues

ProblemSolution
Request rejected with a password/encryption errorThe source PDF is password-protected. Remove the password before running the node, or use Get Metadata if you only need to read its metadata.
Base64 input rejectedThis node only accepts document URLs. Upload the file first (for example, via a storage node) and pass its URL instead.
Annotations, form fields, or outlines missing after Extract, Insert, or a ranged MergeExpected for these operations. If you need to preserve them, avoid page-range operations on the affected pages.
Split or Pages operation returns an error about page numbersConfirm the page numbers or ranges you supplied exist in the source document, out-of-range pages are rejected rather than silently ignored.

Was this page useful?

Subscribe to updates