SUPPA icon

SUPPA

Get data from Suppa API

Overview

This node integrates with the Suppa API to perform CRUD (Create, Read, Update, Delete) operations on data tables managed by Suppa. It allows users to select a table and then execute actions such as creating new records, retrieving records by ID or filter criteria, updating existing records by ID, and deleting records by ID.

Common scenarios where this node is beneficial include:

  • Automating data synchronization between Suppa-managed databases and other systems.
  • Querying specific records or sets of records based on dynamic filters.
  • Managing records programmatically without manual intervention in the Suppa interface.
  • Building workflows that require conditional updates or deletions of data entries.

Practical examples:

  • Creating a new customer record in a "Customers" table when a form is submitted.
  • Retrieving order details by order ID for processing in another system.
  • Filtering products with stock levels below a threshold to trigger restocking alerts.
  • Updating user information after receiving updated data from an external CRM.
  • Deleting obsolete records automatically based on business rules.

Properties

Name Meaning
Таблиця Name or ID Select the target table by name or ID where the action will be performed. Options are loaded dynamically from the Suppa API.
Action The operation to perform on the selected table. Options: Create, Delete by ID, Get by Filter, Get by ID, Update by ID.
Fields (for Create/Update) JSON object specifying field names and values to create or update a record. For example, { "field1": "value1", "field2": "value2" }.
ID запису (recordId) Unique identifier of the record to get, update, or delete. Required for Get by ID, Update by ID, and Delete by ID actions.
Фільтри (filters) JSON object defining filter criteria to search records. Supports operators like greater than (gt). Example: { "field": "value", "field2": { "operator": "gt", "value": 10 } }. Used in Get by Filter action.
Поля для отримання (fields) List of fields to retrieve when using Get by Filter. Defaults to ["id","name"]. Loaded dynamically based on the selected table.
Ліміт (limit) Maximum number of results to return when filtering records. Default is 50.
Зміщення (offset) Number of records to skip before starting to return results when filtering. Default is 0.
Sort Rules to sort filtered results by one or more columns, each with direction ASC or DESC. Used in Get by Filter action.
Дані для оновлення (data) JSON object with fields and values to update in a record. Required for Update by ID action.

Output

The node outputs an array of items, each containing a json property with the result of the executed action:

  • For Create, the output contains the newly created record's data.
  • For Get by ID, the output contains the single record matching the provided ID.
  • For Get by Filter, the output contains an array of records matching the filter criteria, limited and sorted as specified.
  • For Update by ID, the output contains the updated record's data.
  • For Delete by ID, the output typically contains confirmation or status of the deletion.

If an error occurs during processing and the node is configured to continue on failure, the output item will contain an error field describing the issue.

The node does not output binary data.

Dependencies

  • Requires access to the Suppa API endpoint, including:
    • A base URL for the Suppa API.
    • An API key credential for authorization.
  • The node uses HTTP requests to communicate with the Suppa API.
  • n8n credentials must be configured with the necessary API key and base URL.
  • Dynamic loading of tables and fields depends on successful API calls to Suppa.

Troubleshooting

  • Invalid or missing API credentials: Ensure the API key and base URL are correctly set in the node credentials. Authentication failures will prevent any action.
  • Table not found or invalid table ID: Selecting a non-existent table or providing an incorrect table ID will cause errors. Use the dynamic selector or verify IDs manually.
  • Record ID not provided or invalid: Actions requiring a record ID (getById, updateById, deleteById) will fail if the ID is missing or incorrect.
  • Malformed JSON in fields, filters, or data properties: JSON inputs must be valid. Syntax errors will cause parsing failures.
  • Unsupported action: If an unknown action is specified, the node throws an error indicating an invalid action.
  • API request failures: Network issues or API downtime can cause errors. Check connectivity and API status.
  • Empty results on filtering: Filters may return no records if criteria do not match; verify filter syntax and field names.

Links and References

Discussion