Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Documents, PDF & OCR

Documents, PDF & OCR

Switch Workflow

When an API call/webhook arrives, it reads and extracts data from documents using Airtable.

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

  1. Event Type
  2. Get Prompt Fields
  3. Get File Data
  4. Extract from File
  5. Get Result
  6. Loop Over Items
  7. Row Reference
  8. Generate Field Value
  9. Fields to Update
  10. Loop Over Items1
  11. Row Ref
  12. Get File Data1
  13. Extract from File1
  14. Get Result1

36 steps in total.

Similar automations