Library / Documents, PDF & OCR
Documents, PDF & OCR
Baserow Dynamic Prompts with PDF Analysis
When a Baserow event reaches the webhook, it reads the user-defined prompt fields in the table and applies them to a PDF.
What it does
## Try It Out! ### This n8n template powers a "dynamic" or "user-defined" prompts with PDF workflow pattern for a Baserow. Each field allows us to define a name, type and description and together form the schema. The first 2 are self-explaintory but the "description" will be for users to provide their prompts ie. what data should the field to contain. * In this template, a webhook trigger waits for when a row or column is updated. The incoming event comes with lots of details such as the table, row and/or column Ids that were impacted. * We use this information to fetch the table's schema in order to get the column's descriptions (aka dynamic prompts). * For each triggered event, we download our input ie. the PDF and ready it for our AI/LLM. By iterating through the available columns and feeding the dynamic prompts, our LLM can run those prompts against the PDF and thus generating a value response for each cell. * These values are then collected and used to update the Baserow Table. ## How to use * You'll need to publish this workflow and make it accessible to our Baserow instance. Good to note, you only really need to do this once and can reuse for many Baserow Tables. * Configure your Baserow Table to send row_updated, field_created and field_updated events to this n8n workflow. * This workflow should work with both cloud-hosted and self-hosted versions of Baserow. ### Need Help? Join the [Discord]({{ $env.WEBHOOK_URL }} or ask in the [Forum]({{ $env.WEBHOOK_URL }} Happy Flowgramming!
The steps
- Baserow Event
- Event Type
- Table Fields API
- Get Prompt Fields
- Get Event Body
- List Table API
- Get Valid Rows
- Get File Data
- Extract from File
- Update Row
- Get Result
- Loop Over Items
- Row Reference
- Generate Field Value
107 steps in total.
Similar automations