Attio icon

Attio

Interact with Attio API

Overview

This node operation "List Records" under the "Records" resource allows users to query and retrieve a list of records from a specified object in an external system via its API. It supports filtering, sorting, pagination (limit and offset), enabling precise control over which records are returned and how they are ordered.

Common scenarios where this node is beneficial include:

  • Fetching filtered subsets of data, e.g., all people named "Ada Lovelace".
  • Retrieving sorted lists of records, such as contacts sorted by last name ascending.
  • Paginating through large datasets by specifying limits and offsets.
  • Integrating record data into workflows for further processing or automation.

Practical example: A user wants to get up to 500 "people" records whose name matches "Ada Lovelace", sorted by last name ascending, starting from the first record.

Properties

Name Meaning
Object A UUID or slug identifying the object type to list records for. Example: "people".
Filter JSON object used to filter results to a subset matching criteria. For example, { "name": "Ada Lovelace" }.
Sorts JSON array defining sorting rules. Each item specifies direction ("asc" or "desc"), attribute, and field to sort by.
Limit Number specifying the maximum number of results to return. Defaults to 500. Useful for controlling page size in pagination.
Offset Number specifying how many results to skip before returning. Defaults to 0. Useful for paginating through result sets.

Output

The output is an array of items where each item's json property contains the response from the API listing the records matching the query parameters. The structure of the JSON depends on the external API's response but typically includes an array of record objects with their attributes.

No binary data output is indicated by the source code.

Dependencies

  • Requires an API key credential for authenticating requests to the external service.
  • The node sends HTTP POST requests to the endpoint /v2/objects/{object}/records/query with appropriate headers including the bearer token.
  • The base URL for the API is https://api.attio.com.
  • The node expects the user to configure the API authentication credentials in n8n prior to use.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication errors.
    • Incorrect object identifier (UUID or slug) may lead to "not found" or empty results.
    • Malformed JSON in the Filter or Sorts properties can cause parsing errors.
    • Exceeding API rate limits or request size limits may cause failures.
  • Error messages:

    • Errors thrown by the node will include messages from the underlying HTTP request failure.
    • If the operation or resource is not found in the configuration, the node throws an error indicating the operation/resource mismatch.
    • JSON parse errors on Filter or Sorts inputs should be checked and corrected.
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm the object identifier is correct and exists.
    • Validate JSON syntax in Filter and Sorts fields.
    • Use smaller limit values or add delays if hitting rate limits.

Links and References

Discussion