Overview
This node interacts with a multi-dimensional table service (多维表格) to query records from a specified database table. It is designed to fetch multiple records based on various filtering and sorting criteria, making it useful for scenarios where you need to retrieve structured data from complex tables dynamically.
Common use cases include:
- Retrieving filtered datasets for reporting or further processing.
- Extracting records that meet specific conditions, such as date ranges, status, or user-related filters.
- Sorting results by one or more fields in ascending or descending order.
- Limiting the number of returned records to optimize performance or pagination.
For example, you might use this node to get all customer records created within the last month, sorted by their last update time, or to fetch entries where a checkbox field is checked.
Properties
Name | Meaning |
---|---|
app_token | The unique identifier token for accessing the multi-dimensional table service. |
记录表 (databaseId) | The target database table to operate on. Must be selected after providing the app_token . |
限制 (limit) | Maximum number of records to return. Value range: 1 to 100. Default is 50. |
过滤器 (filterType) | Type of filter to apply when querying records. Options: - 无 (none): No filtering. - 手动构建 (manual): Build filters manually using conditions. - JSON: Provide a JSON string filter. |
必须匹配 (matchType) | When using manual filters, defines whether any filter condition or all filter conditions must match. Options: - 任意过滤器 (anyFilter) - 所有过滤器 (allFilters) |
过滤器 (filters) | Collection of filter conditions when using manual filter type. Each condition includes: - 属性名称或 ID (key): Property name or ID to filter on. - 条件 (condition): Condition operator depending on property type. - Various value fields depending on property type (e.g., TextValue, NumberValue, Date, etc.) |
过滤器(JSON)(filterJson) | Raw JSON string representing the filter, used when filterType is JSON. |
选项 (options) | Additional options for the query, including: - 排序 (sort): Multiple sorting rules specifying property, type, and direction (ascending/descending). |
The filter conditions support a wide variety of property types such as Text, Number, Checkbox, SingleSelect, MultiSelect, DateTime, User, Attachment, Email, Phone, Currency, Barcode, Rating, Progress, Links, CreatedUser, ModifiedUser, CreatedTime, ModifiedTime, and formula-based properties. Each type has relevant operators like "is", "isNot", "contains", "isEmpty", "isGreater", etc.
Output
The node outputs an array of records matching the query criteria. Each record's data is presented in the json
output field, containing the properties and their values as stored in the multi-dimensional table.
If binary data is present in any record (e.g., attachments), it will be included accordingly in the binary output part of the item.
Dependencies
- Requires access to the multi-dimensional table service identified by the
app_token
. - The node depends on API calls to fetch database tables, filter properties, and select values dynamically.
- Proper authentication via an API key or token (represented here generically as
app_token
) is necessary. - No other external dependencies are explicitly required.
Troubleshooting
- Invalid or missing
app_token
: Ensure the token is correct and has sufficient permissions to access the target database. - Database table not found: Verify that the selected
databaseId
exists and corresponds to the providedapp_token
. - Filter syntax errors: When using JSON filters, ensure the JSON string is valid and follows the expected schema.
- Exceeding limit constraints: The
limit
property must be between 1 and 100; setting outside this range may cause errors. - Unsupported filter conditions: Make sure filter conditions match the property types correctly; mismatched types can lead to no results or errors.
- API rate limits or connectivity issues: Network problems or API throttling may cause failures; retry or check network settings.
Links and References
- Multi-dimensional Table Service API Documentation (linked in the property description for JSON filters)
- n8n Expressions Documentation — for using expressions in property selections and filters