Files
sim/apps/docs/content/docs/en/integrations/supabase.mdx
T
Waleed 10b6bb33e9 feat(google-appsheet): add Google AppSheet integration (#5376)
* feat(google-appsheet): add Google AppSheet integration

- 4 tools (find/add/edit/delete rows) against the AppSheet Action API
- API key auth via Application Access Key (no OAuth/scopes needed)
- Block with operation dropdown, region selector, and Selector expression support
- Generated docs

* improvement(google-appsheet): harden response parsing, add wand config and skills

- Guard against empty/non-JSON AppSheet response bodies (Delete may return no body)
- Add wandConfig to the Selector field for AI-assisted expression generation
- Add 3 skills grounded in attested AppSheet/Zapier automation patterns
- Tighten json output descriptions to describe inner shape

* fix(google-appsheet): validate region against allow-list, encode appId, validate rows shape

- Reject unrecognized region values instead of interpolating them into the
  request host (a caller could otherwise redirect the Application Access
  Key to an arbitrary domain)
- URL-encode appId, not just tableName, in the Action endpoint path
- Reject non-array Rows input in tools.config.params instead of forwarding
  a single object to the AppSheet Action API
- Drop the mismatched json-object generationType on the rows wand config
  (that enricher appends "must start with { and end with }", which
  conflicts with the JSON-array shape the field expects)
- Add utils.test.ts covering region validation and response-body parsing

* docs(google-appsheet): add manual intro/getting-started section

Match the MANUAL-CONTENT convention used by other integration docs
(Airtable, Ahrefs, Google PageSpeed) — an overview of the service, what
the Sim integration lets agents do, and how to get an Application
Access Key.

* docs: sync generated integration docs with current source

Regenerate docs for integrations whose tools/blocks changed upstream
without a matching docs regen (ahrefs, algolia, amplitude, brex, clerk,
gong, hex, langsmith, loops, onepassword, sendgrid, sharepoint,
similarweb, supabase, tailscale, trello, vercel, wordpress), plus the
integrations.json catalog.
2026-07-02 11:58:30 -07:00

670 lines
29 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Supabase
description: Use Supabase database
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="supabase"
color="#1C1C1C"
/>
{/* MANUAL-CONTENT-START:intro */}
[Supabase](https://www.supabase.com/) is a powerful open-source backend-as-a-service platform that provides developers with a suite of tools to build, scale, and manage modern applications. Supabase offers a fully managed [PostgreSQL](https://www.postgresql.org/) database, robust authentication, instant RESTful and GraphQL APIs, real-time subscriptions, file storage, and edge functions—all accessible through a unified and developer-friendly interface. Its open-source nature and compatibility with popular frameworks make it a compelling alternative to Firebase, with the added benefit of SQL flexibility and transparency.
**Why Supabase?**
- **Instant APIs:** Every table and view in your database is instantly available via REST and GraphQL endpoints, making it easy to build data-driven applications without writing custom backend code.
- **Real-time Data:** Supabase enables real-time subscriptions, allowing your apps to react instantly to changes in your database.
- **Authentication & Authorization:** Built-in user management with support for email, OAuth, SSO, and more, plus row-level security for granular access control.
- **Storage:** Securely upload, serve, and manage files with built-in storage that integrates seamlessly with your database.
- **Edge Functions:** Deploy serverless functions close to your users for low-latency custom logic.
**Using Supabase in Sim**
Sim’s Supabase integration makes it effortless to connect your agentic workflows to your Supabase projects. With just a few configuration fields—your Project ID, Table name, and Service Role Secret—you can securely interact with your database directly from your Sim blocks. The integration abstracts away the complexity of API calls, letting you focus on building logic and automations.
**Key benefits of using Supabase in Sim:**
- **No-code/low-code database operations:** Query, insert, update, and delete rows in your Supabase tables without writing SQL or backend code.
- **Flexible querying:** Use [PostgREST filter syntax](https://postgrest.org/en/stable/api.html#operators) to perform advanced queries, including filtering, ordering, and limiting results.
- **Seamless integration:** Easily connect Supabase to other tools and services in your workflow, enabling powerful automations such as syncing data, triggering notifications, or enriching records.
- **Secure and scalable:** All operations use your Supabase Service Role Secret, ensuring secure access to your data with the scalability of a managed cloud platform.
Whether you’re building internal tools, automating business processes, or powering production applications, Supabase in Sim provides a fast, reliable, and developer-friendly way to manage your data and backend logic—no infrastructure management required. Simply configure your block, select the operation you need, and let Sim handle the rest.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Supabase into the workflow. Supports database operations (query, insert, update, delete, upsert), full-text search, RPC functions, Edge Function invocation, row counting, vector search, and complete storage management (upload, download, list, move, copy, delete files and buckets).
## Actions
### `supabase_query`
Query data from a Supabase table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `schema` | string | No | Database schema to query from \(default: public\). Use this to access tables in other schemas. |
| `select` | string | No | Columns to return \(comma-separated\). Defaults to * \(all columns\) |
| `filter` | string | No | PostgREST filter \(e.g., "id=eq.123"\) |
| `orderBy` | string | No | Column to order by \(add DESC for descending\) |
| `limit` | number | No | Maximum number of rows to return |
| `offset` | number | No | Number of rows to skip \(for pagination\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of records returned from the query |
### `supabase_insert`
Insert data into a Supabase table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to insert data into |
| `schema` | string | No | Database schema to insert into \(default: public\). Use this to access tables in other schemas. |
| `data` | array | Yes | The data to insert \(array of objects or a single object\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of inserted records |
### `supabase_get_row`
Get a single row from a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to query |
| `schema` | string | No | Database schema to query from \(default: public\). Use this to access tables in other schemas. |
| `select` | string | No | Columns to return \(comma-separated\). Defaults to * \(all columns\) |
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., "id=eq.123"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array containing the row data if found, empty array if not found |
### `supabase_update`
Update rows in a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to update |
| `schema` | string | No | Database schema to update in \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., "id=eq.123"\) |
| `data` | object | Yes | Data to update in the matching rows |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of updated records |
### `supabase_delete`
Delete rows from a Supabase table based on filter criteria
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to delete from |
| `schema` | string | No | Database schema to delete from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., "id=eq.123"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of deleted records |
### `supabase_upsert`
Insert or update data in a Supabase table (upsert operation)
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to upsert data into |
| `schema` | string | No | Database schema to upsert into \(default: public\). Use this to access tables in other schemas. |
| `data` | array | Yes | The data to upsert \(insert or update\) - array of objects or a single object |
| `onConflict` | string | No | Comma-separated column\(s\) with a unique or primary key constraint to resolve conflicts on \(e.g., "email"\). Defaults to the primary key. |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of upserted records |
### `supabase_count`
Count rows in a Supabase table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to count rows from |
| `schema` | string | No | Database schema to count from \(default: public\). Use this to access tables in other schemas. |
| `filter` | string | No | PostgREST filter \(e.g., "status=eq.active"\) |
| `countType` | string | No | Count type: exact, planned, or estimated \(default: exact\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `count` | number | Number of rows matching the filter |
### `supabase_text_search`
Perform full-text search on a Supabase table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `table` | string | Yes | The name of the Supabase table to search |
| `schema` | string | No | Database schema to search in \(default: public\). Use this to access tables in other schemas. |
| `column` | string | Yes | The column to search in |
| `query` | string | Yes | The search query |
| `searchType` | string | No | Search type: plain, phrase, or websearch \(default: websearch\) |
| `language` | string | No | Language for text search configuration \(default: english\) |
| `limit` | number | No | Maximum number of rows to return |
| `offset` | number | No | Number of rows to skip \(for pagination\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of records matching the search query |
### `supabase_vector_search`
Perform similarity search using pgvector in a Supabase table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `functionName` | string | Yes | The name of the PostgreSQL function that performs vector search \(e.g., match_documents\) |
| `queryEmbedding` | array | Yes | The query vector/embedding to search for similar items |
| `matchThreshold` | number | No | Minimum similarity threshold \(0-1\), typically 0.7-0.9 |
| `matchCount` | number | No | Maximum number of results to return \(default: 10\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of records with similarity scores from the vector search. Each record includes a similarity field \(0-1\) indicating how similar it is to the query vector. |
### `supabase_rpc`
Call a PostgreSQL function in Supabase
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `functionName` | string | Yes | The name of the PostgreSQL function to call |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | json | Result returned from the function |
### `supabase_invoke_function`
Invoke a Supabase Edge Function over HTTP
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `functionName` | string | Yes | The name of the Edge Function to invoke \(e.g., "hello-world"\) |
| `method` | string | No | HTTP method to use: GET, POST, PUT, PATCH, or DELETE \(default: POST\) |
| `body` | json | No | Request payload to send to the function as a JSON object \(ignored for GET\) |
| `headers` | json | No | Additional request headers as a JSON object of header name to value |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | json | Response body returned by the Edge Function |
### `supabase_introspect`
Introspect Supabase database schema from its OpenAPI spec to get table and column structures (best-effort primary/foreign key detection)
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `schema` | string | No | Database schema to introspect \(defaults to all user schemas, commonly "public"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `tables` | array | Array of table schemas with columns, keys, and indexes |
| ↳ `name` | string | Table name |
| ↳ `schema` | string | Database schema name |
| ↳ `columns` | array | Array of column definitions |
| ↳ `name` | string | Column name |
| ↳ `type` | string | Column data type |
| ↳ `nullable` | boolean | Whether the column allows null values — a NOT NULL column that has a default value is misreported as nullable, since the OpenAPI spec this is derived from omits it from the required list in that case |
| ↳ `default` | string | Default value for the column |
| ↳ `isPrimaryKey` | boolean | Best-effort guess based on the column being named "id" \(not authoritative\) |
| ↳ `isForeignKey` | boolean | True only if the column has a "references table.column" SQL comment; most databases will show false even for real foreign keys |
| ↳ `references` | object | Foreign key reference details, when detected via SQL comment |
| ↳ `table` | string | Referenced table name |
| ↳ `column` | string | Referenced column name |
| ↳ `primaryKey` | array | Array of primary key column names |
| ↳ `foreignKeys` | array | Array of foreign key relationships |
| ↳ `column` | string | Local column name |
| ↳ `referencesTable` | string | Referenced table name |
| ↳ `referencesColumn` | string | Referenced column name |
| ↳ `indexes` | array | Always empty — index definitions are not exposed by the OpenAPI spec this tool reads |
| ↳ `name` | string | Index name |
| ↳ `columns` | array | Columns included in the index |
| ↳ `unique` | boolean | Whether the index enforces uniqueness |
| `schemas` | array | List of schemas found in the database |
### `supabase_storage_upload`
Upload a file to a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `fileName` | string | Yes | The name of the file \(e.g., "document.pdf", "image.jpg"\) |
| `path` | string | No | Optional folder path \(e.g., "folder/subfolder/"\) |
| `fileData` | json | Yes | File to upload - UserFile object \(basic mode\) or string content \(advanced mode: base64 or plain text\). Supports data URLs. |
| `contentType` | string | No | MIME type of the file \(e.g., "image/jpeg", "text/plain"\) |
| `cacheControl` | string | No | Cache-Control header value in seconds for the stored object \(e.g., "3600"; default: "3600"\) |
| `upsert` | boolean | No | If true, overwrites existing file \(default: false\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Upload result including file path, bucket, and public URL |
| ↳ `Id` | string | Unique identifier for the uploaded file |
| ↳ `Key` | string | Full object key including bucket name |
| ↳ `path` | string | Path to the uploaded file within the bucket |
| ↳ `bucket` | string | Name of the bucket the file was uploaded to |
| ↳ `publicUrl` | string | Public URL for the uploaded file |
### `supabase_storage_download`
Download a file from a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `path` | string | Yes | The path to the file to download \(e.g., "folder/file.jpg"\) |
| `fileName` | string | No | Optional filename override |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `file` | file | Downloaded file stored in execution files |
### `supabase_storage_list`
List files in a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `path` | string | No | The folder path to list files from \(default: root\) |
| `limit` | number | No | Maximum number of files to return \(default: 100\) |
| `offset` | number | No | Number of files to skip \(for pagination\) |
| `sortBy` | string | No | Column to sort by: name, created_at, updated_at, last_accessed_at \(default: name\) |
| `sortOrder` | string | No | Sort order: asc or desc \(default: asc\) |
| `search` | string | No | Search term to filter files by name |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of file objects with metadata |
| ↳ `id` | string | Unique file identifier |
| ↳ `name` | string | File name |
| ↳ `bucket_id` | string | Bucket identifier the file belongs to |
| ↳ `owner` | string | Owner identifier |
| ↳ `created_at` | string | File creation timestamp |
| ↳ `updated_at` | string | Last update timestamp |
| ↳ `last_accessed_at` | string | Last access timestamp |
| ↳ `metadata` | object | File metadata including size and MIME type |
| ↳ `size` | number | File size in bytes |
| ↳ `mimetype` | string | MIME type of the file |
| ↳ `cacheControl` | string | Cache control header value |
| ↳ `lastModified` | string | Last modified timestamp |
| ↳ `eTag` | string | Entity tag for caching |
### `supabase_storage_delete`
Delete files from a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `paths` | array | Yes | Array of file paths to delete \(e.g., \["folder/file1.jpg", "folder/file2.jpg"\]\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of deleted file objects |
| ↳ `name` | string | Name of the deleted file |
| ↳ `bucket_id` | string | Bucket identifier |
| ↳ `owner` | string | Owner identifier |
| ↳ `id` | string | Unique file identifier |
| ↳ `updated_at` | string | Last update timestamp |
| ↳ `created_at` | string | File creation timestamp |
| ↳ `last_accessed_at` | string | Last access timestamp |
### `supabase_storage_move`
Move a file within a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `fromPath` | string | Yes | The current path of the file \(e.g., "folder/old.jpg"\) |
| `toPath` | string | Yes | The new path for the file \(e.g., "newfolder/new.jpg"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Move operation result |
| ↳ `message` | string | Operation status message |
| ↳ `Id` | string | Identifier of the destination object |
| ↳ `Key` | string | Full object key of the destination |
### `supabase_storage_copy`
Copy a file within a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `fromPath` | string | Yes | The path of the source file \(e.g., "folder/source.jpg"\) |
| `toPath` | string | Yes | The path for the copied file \(e.g., "folder/copy.jpg"\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Copy operation result with the destination object key |
| ↳ `Key` | string | Full object key of the copied file |
| ↳ `Id` | string | Identifier of the copied object |
### `supabase_storage_create_bucket`
Create a new storage bucket in Supabase
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the bucket to create |
| `isPublic` | boolean | No | Whether the bucket should be publicly accessible \(default: false\) |
| `fileSizeLimit` | number | No | Maximum file size in bytes \(optional\) |
| `allowedMimeTypes` | array | No | Array of allowed MIME types \(e.g., \["image/png", "image/jpeg"\]\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Created bucket result \(name\) |
| ↳ `name` | string | Created bucket name |
### `supabase_storage_update_bucket`
Update the configuration of an existing Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the bucket to update |
| `isPublic` | boolean | No | Whether the bucket should be publicly accessible \(leave unset to keep the current value\) |
| `fileSizeLimit` | number | No | Maximum file size in bytes \(leave unset to keep the current value\) |
| `allowedMimeTypes` | array | No | Array of allowed MIME types \(e.g., \["image/png", "image/jpeg"\]\) — leave unset to keep the current value |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Update operation result |
| ↳ `message` | string | Operation status message |
### `supabase_storage_empty_bucket`
Delete all objects inside a Supabase storage bucket without deleting the bucket itself
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the bucket to empty |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Empty bucket operation result |
| ↳ `message` | string | Operation status message |
### `supabase_storage_list_buckets`
List all storage buckets in Supabase
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | array | Array of bucket objects |
| ↳ `id` | string | Unique bucket identifier |
| ↳ `name` | string | Bucket name |
| ↳ `owner` | string | Owner identifier |
| ↳ `public` | boolean | Whether the bucket is publicly accessible |
| ↳ `created_at` | string | Bucket creation timestamp |
| ↳ `updated_at` | string | Last update timestamp |
| ↳ `file_size_limit` | number | Maximum file size allowed in bytes |
| ↳ `allowed_mime_types` | array | List of allowed MIME types for uploads |
### `supabase_storage_delete_bucket`
Delete a storage bucket in Supabase
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the bucket to delete |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `results` | object | Delete operation result |
| ↳ `message` | string | Operation status message |
### `supabase_storage_get_public_url`
Get the public URL for a file in a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `path` | string | Yes | The path to the file \(e.g., "folder/file.jpg"\) |
| `download` | boolean | No | If true, forces download instead of inline display \(default: false\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `publicUrl` | string | The public URL to access the file |
### `supabase_storage_create_signed_url`
Create a temporary signed URL for a file in a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `path` | string | Yes | The path to the file \(e.g., "folder/file.jpg"\) |
| `expiresIn` | number | Yes | Number of seconds until the URL expires \(e.g., 3600 for 1 hour\) |
| `download` | boolean | No | If true, forces download instead of inline display \(default: false\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `signedUrl` | string | The temporary signed URL to access the file |
### `supabase_storage_create_signed_upload_url`
Create a temporary signed URL a client can use to upload directly to a Supabase storage bucket
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
| `bucket` | string | Yes | The name of the storage bucket |
| `path` | string | Yes | The destination path for the uploaded file \(e.g., "folder/file.jpg"\) |
| `upsert` | boolean | No | If true, allows overwriting an existing file at this path \(default: false\) |
| `apiKey` | string | Yes | Your Supabase service role secret key |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `signedUrl` | string | The temporary signed URL a client can PUT the file to |
| `path` | string | The destination object path |
| `token` | string | The upload token embedded in the signed URL |