AppFlowy icon

AppFlowy

Consume AppFlowy API

Actions6

Overview

This node integrates with the AppFlowy API to interact with database resources within a specified workspace. Specifically, the "Get Fields" operation under the "Database" resource retrieves metadata about the fields (columns) of a selected database. This is useful when you want to dynamically fetch and understand the structure of a database before performing further operations such as querying rows or updating data.

Common scenarios include:

  • Automatically loading database schema information to build dynamic forms or mappings.
  • Validating field names and types before inserting or updating records.
  • Synchronizing external systems by understanding the database structure.

For example, if you have a workspace containing multiple databases, you can use this node to select a specific database and retrieve all its fields, enabling you to map data correctly in subsequent workflow steps.

Properties

Name Meaning
Workspace Name or ID The name or ID of the workspace where the target database resides. You can select from a list or specify an ID using an expression.
Database Name or ID The name or ID of the database whose fields you want to retrieve. This depends on the selected workspace and can be chosen from a list or via expression.

Output

The output is a JSON array where each item represents a field (column) in the specified database. Each field object contains metadata such as the field's unique identifier, name, and type. This allows downstream nodes or processes to understand the database schema.

Example output structure (simplified):

[
  {
    "id": "field_id_1",
    "name": "Field Name 1",
    "field_type": "Text"
  },
  {
    "id": "field_id_2",
    "name": "Field Name 2",
    "field_type": "Number"
  }
]

No binary data is involved in this operation.

Dependencies

  • Requires an active connection to the AppFlowy API via an API key credential configured in n8n.
  • The node uses internal methods to load options for workspaces and databases dynamically, so network access to the AppFlowy service is necessary.
  • No additional environment variables are required beyond the API authentication setup.

Troubleshooting

  • Common issues:

    • Empty or missing workspace/database selection: Ensure that the workspace and database IDs are correctly set and accessible with your API credentials.
    • API request failures: Network issues or invalid API keys will cause errors. Verify your API key and network connectivity.
    • Permission errors: The API key must have sufficient permissions to read workspace and database metadata.
  • Error messages:

    • "No field values provided": This error does not apply directly to "Get Fields" but may appear in other operations if required parameters are missing.
    • General HTTP errors (e.g., 401 Unauthorized, 404 Not Found): Check API credentials and resource identifiers.

To resolve errors, verify credentials, ensure the workspace and database exist, and confirm that the API user has appropriate permissions.

Links and References

Discussion