@apdf/n8n-nodes-apdf

中文文档
1.1.0发布于 2026/10/22MIT零依赖构建来源已验证近 30 天下载 2066

n8n node for Apdf — PDF tracking links, reader analytics and PDF processing

原始使用文档
文档目录20 节
  1. Installation
  2. Credentials
  3. Nodes
  4. Apdf Trigger
  5. Setup
  6. Events
  7. Output
  8. Example
  9. Conditions
  10. Apdf
  11. Document
  12. Tracking Link
  13. Analytics
  14. PDF
  15. Automation
  16. Job
  17. Asynchronous operations
  18. Page ranges
  19. Resources
  20. License

@apdf/n8n-nodes-apdf

An n8n node for Apdf — the PDF engagement layer for apps and agents.

Share a PDF as a per-recipient tracking link, then find out who opened it, which pages they actually read, how long they stayed and what they typed into its forms. The same node also covers the full Apdf PDF toolset: create, convert from Office, merge, split, compress, OCR, encrypt, read and fill forms, and page operations.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the community node installation guide and install @apdf/n8n-nodes-apdf.

Credentials

The nodes authenticate with an Apdf API token.

  1. Sign in at apdf.io and open Dashboard → API → Tokens.
  2. Create a token and copy it. A token belongs to one workspace, so every request through this node acts on that workspace.
  3. In n8n, create new Apdf API credentials and paste the token.

The Base URL field defaults to https://apdf.io/api and only needs changing if you run Apdf on another host.

Apdf sends the token as Authorization: Bearer <token>. The credential test calls GET /me, which returns the user and workspace the token acts as.

Nodes

This package ships two nodes:

NodePurpose
Apdf TriggerStarts a workflow when a reader interacts with a document you shared
ApdfReads engagement data and runs PDF operations

Apdf Trigger

The trigger receives the webhook that an Apdf automation sends when a reader does something.

Automations, and so this trigger, need a Pro or Business plan. On the free Hobby plan Apdf refuses to create the automation, so activating the workflow fails with an error. The same happens once the plan's limit of active automations is reached. See pricing for the limits of each plan.

Setup

The trigger registers itself. Pick the events you care about and activate the workflow — the node creates the matching automation in Apdf, and deletes it again when you deactivate.

  1. Add the Apdf Trigger node and select your Apdf API credentials.
  2. Choose one or more Events.
  3. Optionally restrict it to certain Documents by ID, and add Conditions such as page number equals 7.
  4. Activate the workflow. The automation appears under Documents → Automations in Apdf, named after your workflow.

Nothing needs creating by hand. If you delete the automation in Apdf, deactivating and reactivating the workflow recreates it.

Under Options you can set an Auth Header Value. The node sends it to Apdf as a webhook header and rejects any incoming request that does not carry it — worth setting, since the webhook URL is otherwise the only thing protecting the endpoint. Auth Header Name changes which header carries it, and Automation Name overrides the name the automation gets in Apdf.

Events

Choose at least one event. Apdf filters on its side, so the workflow only runs for what you selected.

EventFires when
Document OpenedA reader opens the document
Document DownloadedA reader downloads the document
Document PrintedA reader prints the document
Page ViewedA reader navigates to a page
Page ReadA reader stays on a page, measured every 15 seconds
Page LeftA reader navigates away from a page
Text CopiedA reader copies text from the document
Link ClickedA reader clicks a link in the document
Form SubmittedA reader submits a form in the document
Annotation CreatedA reader creates an annotation
Annotation UpdatedA reader modifies an annotation
Annotation DeletedA reader removes an annotation

Document and page events — opened, downloaded, printed, viewed, read and left — trigger an automation once per reading session, even where the underlying measurement repeats. Page Read is measured every 15 seconds, but your workflow runs once for that session. Text Copied, Link Clicked, Form Submitted and the annotation events fire every time they happen.

Output

The trigger emits the automation payload unchanged:

{
  "automation": { "id": "…", "name": "Notify on read" },
  "document": {
    "doc_id": "…",
    "name": "Proposal.pdf",
    "viewer_url": "https://…",
    "file_pages": 12
  },
  "trigger": { "matched_event": "page:read", "conditions_evaluated": true },
  "event": {
    "session_id": "…",
    "viewer_id": "…",
    "recipient": { "name": "Jane Doe", "email": "[email protected]" },
    "data": { "page": 5, "duration_ms": 45000 }
  },
  "session": { "total_duration_ms": 182000, "pages_viewed": 8, "completion_rate": 66.7 },
  "timestamp": "2026-07-28T12:00:00+00:00"
}

session.completion_rate is a percentage of the document's pages. event.recipient is null when Apdf cannot tie the reader to a tracking link.

event.data varies by event:

Eventevent.data
Page Viewedpage
Page Read, Page Leftpage, duration_ms
Text Copiedpage, text
Link Clickedpage, url, text, is_internal
Form Submittedfields
Annotation Created, Annotation Updatedpage, type, comment_text, comment_author, annotated_text
Annotation Deletedpage
Document Opened, Downloaded, Printednull

Example

Alert your team the moment a prospect reads your pricing page:

  1. Apdf Trigger — event Page Read, Documents set to the proposal's ID, and a Condition of page number equals 5.

    Use a condition rather than an IF node downstream. The automation fires once per reading session, on the first Page Read that satisfies its conditions, so filtering afterwards in n8n would usually see a different page and never match.

  2. Slack — post {{ $json.event.recipient.name }} just read page {{ $json.event.data.page }} — {{ $json.session.pages_viewed }} pages in {{ $json.session.total_duration_ms / 1000 }}s.

Conditions

ConditionTests
Page Number EqualsThe page the event happened on
Time on Page At LeastSeconds spent on that page
Total Reading Time At LeastSeconds spent in the whole session
Pages Viewed At LeastHow many distinct pages were seen
Completion Rate At LeastPercentage of the document read

Not every condition works with every event — a page condition needs a page event, for instance. Apdf validates the combination when the workflow is activated and returns a clear error if it cannot work.

Apdf

Wherever an operation needs a document, the node offers a Document Name or ID dropdown populated from your workspace — pick one, or supply an ID with an expression when it comes from an earlier node.

List operations follow the n8n convention: Return All fetches every page, or leave it off and set a Limit. Responses are unwrapped, so each record arrives as its own item rather than as one item holding the whole response.

Document

Create, list, get and delete tracked documents, archive and unarchive them, and switch a document between public and link-only access.

Creating a document takes a publicly reachable File URL and a Name.

Create one link per recipient so that reading activity is attributed to a person rather than an anonymous reader. Create, list, delete, activate and deactivate links.

A Recipient Name is required; Recipient Email is optional.

Analytics

OperationReturns
Get Document AnalyticsSessions, readers, completion rate and downloads for a document
Get SessionsThe reading sessions recorded for a document
Get SessionOne session, including its per-page detail
Get AnnotationsHighlights and comments readers left
Get Form SubmissionsWhat readers typed into the document's forms

PDF

The operations of the Apdf PDF API: Create From HTML, Convert From Office, Merge, Split, Compress, Convert to Image, Extract Pages, Delete Pages, Rotate Pages, Overlay Pages, Underlay Pages, Search Content, Read Content, OCR Convert, OCR Search Content, OCR Read Content, Read Form, Fill Form, Visualize Form, Add Security, Remove Security and Read Metadata.

Every operation takes its source as a publicly reachable URL. Operations that change a PDF return a new file and never modify the source, including Delete Pages.

Convert From Office takes a Word, Excel, PowerPoint, OpenDocument or RTF file (docx, doc, xlsx, xls, pptx, ppt, odt, ods, odp, rtf) instead of a PDF.

The form operations work together:

  • Read Form returns every form field with its name, type, value and options, along with its label and the text printed around it on the page.
  • Fill Form takes the fields to fill by those names. A checkbox takes true or false; radio buttons, dropdowns and list boxes take the option to select. Fields you leave out keep their value, and calculated fields such as totals are updated. Enable Flatten under Options so the filled fields can no longer be changed.
  • Visualize Form renders the form pages as images with a numbered box on every field, and lists which field each number is. Hand the images to an AI step, so it can tell which field to fill even when the names say nothing, like Text12.

Automation

Full control over the rules that turn reader activity into webhook calls: Create, Get, Get Many, Delete, Activate, Deactivate, Duplicate, and Get Executions for the delivery history.

Creating one takes a Name, one or more Events and a Webhook URL. Set Scope to Specific Documents to narrow it to given IDs, add Conditions to fire only past a threshold, and add Webhook Headers so your endpoint can authenticate the call.

Like the trigger, this needs a Pro or Business plan. Create, Activate and Duplicate fail with an error on the Hobby plan or once the plan's limit of active automations is reached.

If you only want a workflow to react to readers, use the Apdf Trigger instead — it creates and removes its own automation. Use this resource when you are managing automations programmatically, for instance pointing them at systems outside n8n.

Job

Check Status polls an asynchronous operation for its result.

Asynchronous operations

Apdf runs heavy work on a queue. Seven operations always return a job ID instead of a result:

  • Create From HTML
  • Convert From Office
  • Compress
  • Convert to Image
  • OCR Convert
  • OCR Read Content
  • OCR Search Content

The remaining PDF operations run inline by default, and return a job ID only when you enable Run Asynchronously under Options.

To get the result of a job, either poll it with the Job → Check Status operation, or set a Webhook URL so Apdf calls you when the job finishes.

Page ranges

Operations that take a Pages value accept page numbers and ranges, for example 1,3-5. Two shortcuts are available:

  • z — the last page
  • rN — the Nth page from the end, so r2 is the second-to-last page

Split additionally accepts nN, which splits into files of N pages each. n2 yields files of two pages.

Resources

License

MIT

版本与发布记录

@apdf/n8n-nodes-apdf 共发布 11 个版本,首次发布于 2026/10/09;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.1.0latest2026/10/2217 天前
1.0.12026/10/1820 天前
1.0.02026/10/1721 天前
0.1.72026/10/1622 天前
0.1.62026/10/1028 天前
0.1.52026/10/1028 天前

关于 @apdf/n8n-nodes-apdf 的常见问题

@apdf/n8n-nodes-apdf 是什么?

n8n node for Apdf — PDF tracking links, reader analytics and PDF processing

如何安装 @apdf/n8n-nodes-apdf?

在项目目录运行 npm install @apdf/n8n-nodes-apdf,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:n8n-workflow(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@apdf/n8n-nodes-apdf 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/apdf__n8n-nodes-apdf 是否存在。

@apdf/n8n-nodes-apdf 可以商用吗?

@apdf/n8n-nodes-apdf 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@apdf/n8n-nodes-apdf 的下载量有多少?

根据 npm 官方下载统计,@apdf/n8n-nodes-apdf 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,066 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apdf/n8n-nodes-apdf 还在维护吗?

最新版本 1.1.0 发布于 2026/10/22(17 天前);至今共发布 11 个版本,其中过去 12 个月发布了 11 个;首次发布于 2026/10/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。