Aitable icon

Aitable

Interact with the Aitable API

Overview

This node interacts with the Aitable API to manage records within datasheets. Specifically, the Search operation allows users to query records in a selected datasheet by specifying one or more field-value pairs as search criteria. The node constructs a filter formula from these fields and retrieves matching records.

Common scenarios where this node is beneficial include:

  • Finding specific entries in a datasheet based on dynamic criteria.
  • Filtering records without retrieving the entire dataset.
  • Automating workflows that depend on conditional data retrieval from Aitable.

For example, you might use this node to search for all records where the "Status" field equals "Completed" and the "Priority" field equals "High".

Properties

Name Meaning
Datasheet Select the datasheet to operate on. This determines which datasheet's records will be searched.
Fields One or more field-value pairs used as search criteria. Each pair specifies a field and the value to match.

The Fields property supports multiple entries, allowing complex AND-based filtering by combining several conditions.

Output

The output is an array of JSON objects, each representing a record that matches the search criteria. Each record object contains its fields and values as returned by the Aitable API.

If no records match the search criteria, the node outputs a single JSON object indicating that no matching record was found, structured as:

{
  "recordId": "can't find",
  "<fieldName>": "can't find <value>"
}

where <fieldName> and <value> correspond to the first field-value pair provided in the search.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token credential for the Aitable API.
  • The node makes HTTP requests to the Aitable API endpoints.
  • Proper configuration of the API token credential in n8n is necessary for successful operation.

Troubleshooting

  • No matching records found: If the search returns no results, the node outputs a JSON object indicating no match rather than throwing an error. Verify that the field names and values are correct and exist in the datasheet.
  • API errors: Errors from the Aitable API (e.g., invalid datasheet ID, expired token) result in error messages like Aitable API Error: <message>. Ensure the API token is valid and has sufficient permissions.
  • Field loading issues: The list of available fields depends on the selected datasheet. If fields do not load correctly, check network connectivity and API credentials.
  • Incorrect field names or values: Since the search uses exact matching ({field}='value'), ensure values match exactly, including case sensitivity.

Links and References

Discussion