# Summarize Documents from Supabase

**URL:** <https://community.n8n.io/t/summarize-documents-from-supabase/60445>\
**Category:** Questions\
**Created:** [November 1, 2024, 8:28pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445 "2024-11-01T20:28:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dale](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/dale/32/46072_2.png) [@Dale](https://community.n8n.io/u/Dale)\
**Post date:** [November 1, 2024, 8:28pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445/1 "2024-11-01T20:28:34Z")

</div>

## 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:**

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [November 1, 2024, 8:28pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445/2 "2024-11-01T20:28:36Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![Jim\_Le](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jim_le/32/45558_2.png) [@Jim\_Le](https://community.n8n.io/u/Jim_Le)\
**Post date:** [November 4, 2024, 12:17pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445/3 "2024-11-04T12:17:53Z")

</div>

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](https://supabase.com/storage).

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](https://n8n.io/workflows/2388-dynamically-generate-a-webpage-from-user-request-using-openai-structured-output/).

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](https://n8n.io/workflows/2464-scale-deal-flow-with-a-pitch-deck-ai-vision-chatbot-and-qdrant-vector-store/)

Good luck!

---

<div class="post-metadata">

**Author:** ![Dale](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/dale/32/46072_2.png) [@Dale](https://community.n8n.io/u/Dale)\
**Post date:** [November 13, 2024, 1:28pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445/4 "2024-11-13T13:28:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 11, 2025, 1:29pm UTC](https://community.n8n.io/t/summarize-documents-from-supabase/60445/5 "2025-02-11T13:29:14Z")

</div>

Closed on February 11, 2025, 1:29pm UTC

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