All templates

AI

Index Policy PDF Vectors

Extract a policy PDF and index its text chunks in a vector table.

Index Policy PDF Vectors workflow in Open FlowIndex Policy PDF Vectors workflow in Open Flow

Extract a policy PDF and index its text chunks in a vector table.

Setup and use

In Open Flow connect PDF.co and OpenAI, configure Supabase REST project URL, SUPABASE_KEY and SUPABASE_AUTHORIZATION and persistent State. Create a documents table with auto-generated id, content text, metadata jsonb, and embedding vector(1536); enable pgvector and grant insert permissions. Run with a direct HTTPS PDF URL and a document version.

Behavior

The PDF is extracted, split into overlapping chunks, embedded and inserted into the vector table. A new version is a new index; remove obsolete vectors separately if needed. Inspect the database before clearing any pending checkpoint after an uncertain write. Avoid overlapping runs. Open Flow sends the PDF URL to PDF.co and document text to OpenAI. The excluded Telegram chat is not part of this component.

In n8n

In n8n set the PDF URL and version in Policy settings, configure OpenAI and PostgreSQL credentials and PGVector table, and select a Data Table with item_key and status text columns.

Inspiration & credits

Adapted from HR & IT Helpdesk Chatbot with Audio Transcription in enescingoz/awesome-n8n-templates.

Source collection notice: © 2024–2026 Enes Cingoz, CC BY 4.0. The source export does not identify a separate template author or license. See repository licensing for the scope of OOMOL contributions and third-party material.

Changes from source: Isolate PDF indexing, use PDF.co for Open Flow extraction, use current embeddings and add chunk checkpoints.

Collection license notice:

Creative Commons Attribution 4.0 International License

Copyright (c) 2024-2026 Enes Cingoz

You are free to:

  Share - copy and redistribute the material in any medium or format
  Adapt - remix, transform, and build upon the material for any purpose,
  even commercially.

Under the following terms:

  Attribution - You must give appropriate credit, provide a link to the
  license, and indicate if changes were made. You may do so in any
  reasonable manner, but not in any way that suggests the licensor
  endorses you or your use.

  No additional restrictions - You may not apply legal terms or
  technological measures that legally restrict others from doing
  anything the license permits.

Notices:

  You do not have to comply with the license for elements of the
  material in the public domain or where your use is permitted by an
  applicable exception or limitation.

  No warranties are given. The license may not give you all of the
  permissions necessary for your intended use. For example, other rights
  such as publicity, privacy, or moral rights may limit how you use the
  material.

For the full license text, see:
https://creativecommons.org/licenses/by/4.0/legalcode