> ## Documentation Index
> Fetch the complete documentation index at: https://runlet.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Supabase Integration Setup

> Configure Supabase for intelligent workflow search and vector embeddings

## Overview

Supabase integration enables Runlet to automatically set up database infrastructure for your workflows. When you connect Supabase, Runlet can create tables, functions, indexes, and all the database components your workflows need - completely automatically.

<Info>
  Supabase integration is optional but recommended for workflows that need data
  storage, user management, or complex data operations.
</Info>

## What You'll Get

With Supabase integration, Runlet provides:

<CardGroup cols={2}>
  <Card title="Automated Database Setup" icon="database">
    Runlet automatically creates tables, indexes, and functions your workflows
    need
  </Card>

  <Card title="Smart Schema Design" icon="gear">
    Optimal database structure based on your workflow requirements
  </Card>

  <Card title="Security & Performance" icon="shield">
    Built-in security policies and performance optimizations
  </Card>

  <Card title="Zero Configuration" icon="zap">
    No manual database setup - everything is handled automatically
  </Card>
</CardGroup>

## Prerequisites

Before setting up Supabase integration:

<CardGroup cols={2}>
  <Card title="Supabase Account" icon="user">
    Free account at [supabase.com](https://supabase.com)
  </Card>

  <Card title="Database Access" icon="key">
    Admin access to create tables and functions in your Supabase project
  </Card>
</CardGroup>

## Step 1: Connect via OAuth

Connecting Supabase to Runlet is simple and secure using OAuth authentication:

<Steps>
  <Step title="Access Integration Button">
    1. In your Runlet chat interface, look for the integrations button (next to the send button)
    2. Click on the integrations button to open the integration options
  </Step>

  <Step title="Select Supabase Integration">
    1. Click on **"Connect Supabase"** from the integration options 2. This will
       open a secure OAuth authorization screen
  </Step>

  <Step title="Authorize Runlet">
    1. You'll be redirected to Supabase's authorization page 2. Sign in to your
       Supabase account if not already logged in 3. Review the permissions Runlet is
       requesting 4. Click **"Authorize runlet.ai"** to grant access
  </Step>

  <Step title="Integration Complete">
    Once authorized, you'll be redirected back to Runlet and the integration will be active. Runlet now has access to create and manage database resources in your Supabase projects.
  </Step>
</Steps>

## Step 2: Automatic Database Setup

Once connected, Runlet handles all database setup automatically:

<Info>
  **No manual setup required!** Runlet automatically creates all necessary
  database components when your workflows need them.
</Info>

### What Runlet Does Automatically

When you create workflows that need database functionality, Runlet will automatically:

<AccordionGroup>
  <Accordion title="Tables & Schema">
    * Creates optimized database tables based on your workflow requirements
    * Sets up proper data types and constraints
    * Handles schema migrations and updates
  </Accordion>

  <Accordion title="Functions & Procedures">
    * Creates custom database functions for complex operations - Sets up stored
      procedures for data processing - Implements business logic at the database
      level
  </Accordion>

  <Accordion title="Indexes & Performance">
    * Creates performance indexes for fast queries - Optimizes database structure
      for your specific use case - Handles query optimization automatically
  </Accordion>

  <Accordion title="Security & Permissions">
    * Sets up Row Level Security (RLS) policies
    * Creates appropriate user roles and permissions
    * Implements secure access patterns
  </Accordion>
</AccordionGroup>

## Step 3: Using Your Supabase Integration

Once connected, you can immediately start creating workflows that use database functionality:

### Example Use Cases

<Tabs>
  <Tab title="User Management">
    **"Create a user registration system with email verification"** Runlet will
    automatically: - Create a `users` table with proper fields - Set up email
    verification functions - Create secure authentication flows - Implement user
    session management
  </Tab>

  <Tab title="Data Collection">
    **"Store form submissions from my website in a database"** Runlet will
    automatically: - Create a `form_submissions` table - Set up data validation
    functions - Create indexes for fast queries - Implement data backup
    procedures
  </Tab>

  <Tab title="Analytics & Reporting">
    **"Track user actions and generate daily reports"** Runlet will
    automatically: - Create event tracking tables - Set up aggregation functions

    * Create reporting views - Schedule automated report generation
  </Tab>

  <Tab title="E-commerce">
    **"Manage product inventory and orders"** Runlet will automatically: -
    Create products, orders, and inventory tables - Set up stock management
    functions - Create order processing workflows - Implement payment tracking
  </Tab>
</Tabs>

### How It Works

<Steps>
  <Step title="Describe Your Workflow">
    Simply tell Runlet what you want to build, including any data storage needs.
    **Example**: "I need a workflow that stores customer feedback in a database
    and sends weekly summary reports"
  </Step>

  <Step title="Automatic Database Design">
    Runlet analyzes your requirements and automatically designs the optimal
    database structure for your needs.
  </Step>

  <Step title="Instant Deployment">
    The workflow is created with all necessary database components and deployed
    to your n8n instance, ready to use immediately.
  </Step>
</Steps>

## Managing Your Integration

### Integration Status

You can check and manage your Supabase integration at any time:

<AccordionGroup>
  <Accordion title="Check Connection Status">
    * In the Runlet chat interface, click the integrations button
    * You'll see "Supabase Connected" if the integration is active
    * The connection status shows when it was last verified
  </Accordion>

  <Accordion title="Disconnect Integration">
    If you need to disconnect Supabase: 1. Click the integrations button in the
    chat interface 2. Click on the Supabase integration 3. Click "Disconnect" to
    revoke access

    <Warning>
      Disconnecting will prevent new workflows from creating database resources,
      but existing workflows will continue to work.
    </Warning>
  </Accordion>

  <Accordion title="Reconnect Integration">
    To reconnect after disconnecting:

    1. Click "Connect Supabase" from the integrations button
    2. Go through the OAuth authorization process again
    3. Your integration will be reactivated
  </Accordion>
</AccordionGroup>

## Troubleshooting

### Common Issues

<AccordionGroup>
  <Accordion title="OAuth Authorization Failed">
    **Symptoms**: Redirect to authorization page fails or shows error

    **Solutions**:

    * Ensure you're logged into your Supabase account
    * Check that your browser allows popups from runlet.ai
    * Try clearing browser cache and cookies
    * Make sure you have admin access to your Supabase organization
  </Accordion>

  <Accordion title="Integration Shows as Disconnected">
    **Symptoms**: Integration button shows "Connect Supabase" instead of "Supabase
    Connected" **Solutions**: - Click "Connect Supabase" to re-authorize - Check
    if you revoked access in your Supabase dashboard - Verify your Supabase
    account is still active
  </Accordion>

  <Accordion title="Workflows Can't Create Database Resources">
    **Symptoms**: Workflows fail when trying to create tables or functions
    **Solutions**: - Verify the Supabase integration is connected and active -
    Check that your Supabase project has sufficient resources - Ensure your
    Supabase plan supports the required database operations - Try reconnecting the
    integration
  </Accordion>

  <Accordion title="Permission Denied Errors">
    **Symptoms**: Database operations fail with permission errors

    **Solutions**:

    * Re-authorize the integration to refresh permissions
    * Check that you have admin access to your Supabase project
    * Verify your Supabase organization settings allow API access
  </Accordion>
</AccordionGroup>

## Next Steps

With Supabase integration complete, you can:

<CardGroup cols={2}>
  <Card title="Create Database Workflows" icon="database" href="/getting-started/ai-agent">
    Start building workflows that use database functionality
  </Card>

  <Card title="Connect n8n" icon="link" href="/integrations/n8n-setup">
    Connect your n8n instance to deploy the workflows
  </Card>

  <Card title="Explore Examples" icon="lightbulb" href="/getting-started/community-workflows">
    Browse database-powered workflow examples
  </Card>

  <Card title="Get Support" icon="help-circle" href="mailto:support@runlet.ai">
    Contact us if you need help with your integration
  </Card>
</CardGroup>

## Need Help?

<CardGroup cols={2}>
  <Card title="Supabase Documentation" icon="book" href="https://supabase.com/docs">
    Official Supabase documentation and guides
  </Card>

  <Card title="Join Our Community" icon="discord" href="https://discord.gg/YcdHU6CtNW">
    Get help from other Runlet users
  </Card>

  <Card title="Contact Support" icon="envelope" href="mailto:support@runlet.ai">
    Technical support for integration issues
  </Card>

  <Card title="Integration Guides" icon="puzzle" href="/integrations/overview">
    Learn about other available integrations
  </Card>
</CardGroup>
