Library / Documents, PDF & OCR
Documents, PDF & OCR
Fill Airtable Fields with Custom AI Prompts from PDFs
When an Airtable event or manual run fires, it reads a PDF and generates each field's value with user-defined AI prompts, then updates the record.
What it does
## Try It Out! ### This n8n template powers a "dynamic" or "user-defined" prompts with PDF workflow pattern for a Airtable. 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 Airtable Record. ## How to use * You'll need to publish this workflow and make it accessible to our Airtable instance. * you must run the "Create Airtable Webhooks" mini-flow to link it to your Airtable. * This template is reusable for other Airtables but the webhooks need to be created each time for each table. ### Need Help? Join the [Discord]({{ $env.WEBHOOK_URL }} or ask in the [Forum]({{ $env.WEBHOOK_URL }} Happy Flowgramming!
The steps
- Event Type
- Get Prompt Fields
- Get File Data
- Extract from File
- Get Result
- Loop Over Items
- Row Reference
- Generate Field Value
- Fields to Update
- Loop Over Items1
- Row Ref
- Get File Data1
- Extract from File1
- Get Result1
95 steps in total.
Similar automations