Summarize Documents from Supabase

Describe the problem/error/question

I have many documents in Supabase. The goal is to download them and then summarize the contents of each file into one HTML summar.

What is the error message (if any)?

No error. I am really just looking for a little help getting started. I have reviewed tutorials and videos but do not see what I really need.

Please share your workflow

Here was what I was thinking:

  1. Trigger - webhook
  2. Supabase:getAll row ( filter on the specific project id)
  3. FileType Switch - to sort by file types
  4. If the document is PDF
  5. Extract form FIle
  6. Use AI Agent to summarize the file
  7. the rest of the workflow

Information on your n8n setup

  • 1.65.2
  • Database Supabase
  • n8n cloud:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Dale

I’d say your approach is spot on.

  1. It sounds like you’re storing PDF binaries in your Supabase or just the URL reference to them? Might be cheaper to use Supabase’s object store for files Storage | Store any digital content.

  2. How important is it to regenerate summaries for old docs when new docs come in? If not, you may want to add a flag for each rows which have been processed previously so you can avoid doing unnecessary duplicate work. I would use a filter node for this after the flag is added.

  3. Don’t forget you can use the LLM to generate the HTML markup as well. Check out this template Dynamically generate a webpage from user request using OpenAI Structured Output | n8n workflow template.

  4. Do some PDFs consist only of scanned images? If so, the “extract from PDF” will struggle to return any content. Using vision capabilities of the LLM is a great solution to this problem. Check out my template here: Scale Deal Flow with a Pitch Deck AI Vision, Chatbot and QDrant Vector Store | n8n workflow template

Good luck!

Thanks for this @Jim_Le I didn’t realize you responded! Taking a lot into this!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.