Emblr Gtr

Read Only Embr Database Node

Emblr Gtr

AI-generated

Overview

This node connects to a Supabase database and performs read-only queries on a specified table (resource). It allows users to retrieve data with optional filtering conditions and control over the number of results returned. This is useful for workflows that need to fetch data dynamically from a Supabase backend, such as syncing records, triggering actions based on database content, or integrating database queries into automation pipelines.

Practical examples:

  • Fetch all user records where the "age" field is greater than 30.
  • Retrieve up to 100 recent orders with status equal to "pending".
  • Query a product catalog with multiple filters combined using AND/OR logic.

Properties

Name Meaning
Return All Boolean flag to return all matching records without limiting the number of results.
Limit Maximum number of results to return if "Return All" is false. Must be at least 1.
Filters One or more filter conditions to apply on fields in the selected table. Each filter includes:
- Field Name or ID: The column to filter by (loaded dynamically from the table schema).
- Condition: Comparison operator (Equal To, Greater Than, Greater than or Equal To, Less Than, etc.)
- Value: The value to compare the field against.
Relation Type Logical operator to combine multiple filters: either AND or OR.

Output

The node outputs an array of JSON objects representing rows fetched from the specified table. Each object contains key-value pairs corresponding to the columns and their values in the database.

If binary data were present, it would be included accordingly, but this node only returns JSON data from the database query.

Example output structure:

[
  {
    "id": 123,
    "name": "John Doe",
    "age": 35,
    "status": "active"
  },
  {
    "id": 124,
    "name": "Jane Smith",
    "age": 28,
    "status": "inactive"
  }
]

Dependencies

  • Requires a Supabase project with a valid URL and public anonymous API key.
  • Needs an API key credential configured in n8n to authenticate with Supabase.
  • Uses the official @supabase/supabase-js client library to interact with the database.
  • The node dynamically loads available tables and columns from the Supabase instance for user selection.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Specifying a non-existent table or column name will result in query errors.
    • Incorrect filter values or unsupported data types may cause query failures.
    • Using "Return All" with very large tables can lead to performance issues or timeouts.
  • Error messages:

    • Errors from Supabase are logged to the console; typical messages include permission denied, invalid query syntax, or connection errors.
    • If no data is returned, verify that the table exists and filters are correctly set.
  • Resolutions:

    • Ensure API credentials are correct and have sufficient permissions.
    • Double-check table and column names via the dynamic dropdowns.
    • Use appropriate filter conditions and values matching the column data types.
    • Limit the number of results when working with large datasets.

Links and References

Discussion