# How to download pdf from supabase?

**URL:** <https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571>\
**Category:** Questions\
**Tags:** supabase, read-pdf\
**Created:** [6 Mayo, 2024 12:22 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571 "2024-05-06T12:22:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![malte.huener](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@malte.huener](https://community.n8n.io/u/malte.huener)\
**Post date:** [6 Mayo, 2024 12:22 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/1 "2024-05-06T12:22:31Z")

</div>

Hi there,

I am new to n8n and want to download a pdf stored at us-abase.  
I found no node for this. Is there a workaround?  
Tanks in advance, happy coding..

## Information on your n8n setup

Version 1.33.0

- **Database (default: SQLite):**  
supabase
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**  
n8n cloud
- **Operating system:**  
MacOS

---

<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:** [6 Mayo, 2024 12:22 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/2 "2024-05-06T12:22:32Z")

</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:** ![atwork1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/atwork1/32/30810_2.png) [@atwork1](https://community.n8n.io/u/atwork1)\
**Post date:** [6 Mayo, 2024 12:46 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/3 "2024-05-06T12:46:18Z")

</div>

Usually (with other services) when you make a query to the API you get a download link to the file.

Then you can download the file using the HTTP-Request node.

---

<div class="post-metadata">

**Author:** ![malte.huener](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@malte.huener](https://community.n8n.io/u/malte.huener)\
**Post date:** [7 Mayo, 2024 09:30 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/4 "2024-05-07T09:30:13Z")

</div>

Hi @atwork1,

thanks for your answer..

recording to the supabase API

 ![Swagger_UI](https://europe1.discourse-cdn.com/n8n/original/3X/a/6/a6a3d7c478ec75ea82ef2bfb44fc02edd05368a2.png)

I tried the following

 ![n8n_-_BWAbot](https://europe1.discourse-cdn.com/n8n/original/3X/6/2/62f0a340dfbd3f52dfc570e9c05f86050a9864b9.jpeg)

..and get a 404 error - but I know the file “/analyses\_bucket/pdf/1715072904040000.pdf” exists. What I am doing wrong?

---

<div class="post-metadata">

**Author:** ![atwork1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/atwork1/32/30810_2.png) [@atwork1](https://community.n8n.io/u/atwork1)\
**Post date:** [7 Mayo, 2024 12:07 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/5 "2024-05-07T12:07:57Z")

</div>

Do you need the header information you’re sending? You’re already authenticated, by the settings above.

---

<div class="post-metadata">

**Author:** ![malte.huener](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@malte.huener](https://community.n8n.io/u/malte.huener)\
**Post date:** [8 Mayo, 2024 02:51 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/6 "2024-05-08T02:51:23Z")

</div>

Hi @atwork1

thank you very much again for your response..

I switched off the header informationen, but still get the 404 error:

 ![n8n_-_BWAbot](https://europe1.discourse-cdn.com/n8n/original/3X/9/0/90e23f2c3bb5ccd67cdcadb89a00a62d6aec7f37.png)

Any other ideas?

This file I can directly access via browser:  
[https://xxxxxxxxxx.supabase.co/storage/v1/object/public/analyses\_bucket/pdf/1715134253889000.pdf](https://xxxxxxxxxx.supabase.co/storage/v1/object/public/analyses_bucket/pdf/1715134253889000.pdf)

Any ideas how to debug?

---

<div class="post-metadata">

**Author:** ![atwork1](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/atwork1/32/30810_2.png) [@atwork1](https://community.n8n.io/u/atwork1)\
**Post date:** [8 Mayo, 2024 06:21 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/7 "2024-05-08T06:21:12Z")

</div>

![grafik](https://europe1.discourse-cdn.com/n8n/original/3X/4/f/4ffd73855b7de942d02720e78fd80de0d1750ee8.png)

can you set the URL to “Expression” and the expression to  
{{ $json.pdf\_name }}

---

<div class="post-metadata">

**Author:** ![malte.huener](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@malte.huener](https://community.n8n.io/u/malte.huener)\
**Post date:** [9 Mayo, 2024 04:18 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/8 "2024-05-09T04:18:49Z")

</div>

**SOLVED**

The Swagger API documentation ([Swagger UI](https://supabase.github.io/storage/#/object/get_object_authenticated __bucketName___ wildcard_)) is incorrect / outdated! The correct one is here: [Serving assets from Storage | Supabase Docs](https://supabase.com/docs/guides/storage/serving/downloads)

So correct endpoint in my case is [https://xxxxxxxxx.supabase.co/storage/v1/object/authenticated/analyses\_bucket/pdf/1715221982654000.pdf](https://xxxxxxxxx.supabase.co/storage/v1/object/authenticated/analyses_bucket/pdf/1715221982654000.pdf)

Further learning: I looked into the RLS a bit because at first I thought it had something to do with it. However, with the service role we bypass the RLS.

---

<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:** [16 Mayo, 2024 04:18 UTC](https://community.n8n.io/t/how-to-download-pdf-from-supabase/45571/9 "2024-05-16T04:18:55Z")

</div>

Cerrado el 16 Mayo, 2024 04:18 UTC

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