Dynamic AI Data Extraction from PDFs using Baserow - n8n Workflow

This powerful n8n workflow template enables dynamic AI data extraction from PDF files uploaded to Baserow. Use custom field descriptions as LLM prompts for seamless automation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Baserow power users and technical content creators.
Teams needing automated document processing and data entry.
Users requiring highly flexible, user-defined AI extraction rules.
n8n automation specialists looking for advanced n8n templates.

Overview

This sophisticated n8n workflow solves the challenge of inflexible data extraction by implementing a 'dynamic prompting' pattern directly linked to your Baserow table structure. The core value of this n8n template is that Baserow users can define their data extraction instructions—the prompt—in the standard 'description' field of any column.

When a PDF is uploaded to a row, or when a column's description (the prompt) is changed, this robust n8n automation triggers. The n8n workflow intelligently routes the event, fetching the table schema to access the dynamic prompt. It then downloads and processes the PDF, instructing the LLM (via an OpenAI integration) to extract the specific data point required by the user-defined prompt. This structure transforms your Baserow table into a powerful, custom-configurable AI agent. This powerful n8n node-based solution ensures high efficiency and minimal manual intervention.

How it Works

The automation begins with the Baserow Event n8n trigger, configured as a webhook to listen for Baserow events, specifically rows.updated, field.created, and field.updated. The initial steps use an HTTP Request n8n node to fetch the required Baserow API data, retrieving the table schema and identifying fields that contain descriptions (our dynamic prompts).

The Event Type Switch n8n node acts as a crucial router. If only a single row is updated, the n8n workflow enters an optimized loop to update only the missing fields in that row. If a field or column schema is updated, the n8n workflow must process all eligible rows, iterating through the entire table using a pagination-enabled HTTP Request n8n node.

For each row item, the n8n workflow executes a series of steps: it uses an HTTP Request n8n node to download the associated PDF file, followed by the Extract from File n8n node to convert the PDF content into raw text. This text, along with the dynamic prompt pulled from the Baserow field description, is fed into the Generate Field Value (Chain LLM) n8n node. This specialized n8n node uses OpenAI to perform the requested extraction.

Finally, the extracted data is structured by a Set n8n node and patched back to the corresponding Baserow row via an HTTP Request n8n node. The entire process is wrapped in iterative loops (Split in Batches n8n node) to manage high volumes of data efficiently, ensuring this n8n workflow is highly reliable.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n canvas using the 'New' > 'Import from JSON' option.

  2. Configure Baserow Webhook Credentials: Ensure your Baserow API Token is set up as an 'HTTP Header Auth' credential, as the n8n workflow uses direct HTTP requests for flexible API interaction. The credential ID used in this n8n template is F28aPWK5NooSHAg0.

  3. Configure OpenAI Credentials: Set up your OpenAI Chat Model credentials, required for the Generate Field Value n8n node.

  4. Set up the Baserow Trigger: Publish this n8n workflow to activate the webhook URL.

  5. Configure Baserow: In your Baserow table settings, create a webhook (POST request) pointing to the generated n8n trigger URL. Select the options to send row updated, field created, and field updated events. Crucially, specify your file input field (e.g., 'File') for the row updated event to ensure the n8n trigger fires only when a document is uploaded.

Node Details

Baserow Event (n8n trigger): This is the entry point, an n8n trigger configured as a webhook to capture POST events from Baserow, initiating the entire n8n workflow based on data changes.
Table Fields API (HTTP Request n8n node): Essential for dynamic prompting. This node uses the Baserow API to retrieve the current table schema, including field descriptions which are treated as dynamic LLM instructions.
Event Type (Switch n8n node): Manages flow control, routing events based on the type (rows.updated for minimal updates, or field.created/field.updated for bulk column updates) to ensure efficient processing in the n8n workflow.
Get Prompt Fields (Code n8n node): A utility n8n node that filters the retrieved schema, keeping only the fields that have user-defined descriptions, thereby defining the universe of required AI extractions.
Extract from File (n8n node): Handles the physical document processing. It downloads the file based on the Baserow URL and uses its internal PDF operation to extract the raw text content for the LLM.
Generate Field Value (Chain LLM n8n node): The core AI processing element. This n8n node feeds the extracted text and the dynamic Baserow field description (the prompt) to an OpenAI model, generating the required structured data point.


  • Update Row (HTTP Request n8n node): Performs the final action of the n8n workflow. It uses a PATCH request against the Baserow API, dynamically constructing a JSON payload with the extracted value to update the specific row.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by
Jimleuk
Jimleuk

Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk

Featured*