Unstract tutorial: invoice extraction to PostgreSQL
Build an invoice extraction workflow with Unstract, Google Drive and PostgreSQL, then schedule hourly runs and test the results in Supabase.
Player not loading? Watch on YouTube
This tutorial builds an invoice processing pipeline with Unstract. The presenter uses its cloud interface to turn PDFs, scans and phone photos into structured JSON, then store the results in PostgreSQL through Supabase. He describes Unstract as open source and mentions self-hosting, but does not demonstrate that deployment path.
The extraction work starts in Prompt Studio with five sample invoices. Each field has a prompt and an output type; line items use a JSON array. The presenter tests alternate labels such as bill number and statement number, checks results against the documents, and revises prompts when fields fail. He explains that LLMWhisperer extracts text with OCR before the LLM receives it. His claims about accuracy across hundreds of formats are not a measured benchmark in this tutorial.
The next section deploys the extraction as an API and tests an uploaded invoice in Postman. The automated ETL workflow takes a separate route: it uses the Prompt Studio project exported as a reusable tool, rather than calling that API. A Google Drive connector supplies invoices, and a database connector writes the extracted data to an invoices table.
The example checks for new files every hour, with a manual sync option for testing. The presenter processes three invoices and inspects their database rows. A dashboard illustrates how to use the stored data, but frontend implementation is outside the tutorial's focus.