Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

The Activity → List operation in this custom n8n node retrieves a list of activity records from the connected service. It supports advanced querying, filtering, aggregation, and export options. This node is useful for scenarios where you need to fetch, analyze, or export activity logs or records—such as generating reports, monitoring user actions, or integrating activity data with other systems.

Practical examples:

  • Fetching all recent activities for audit purposes.
  • Exporting activity logs as CSV or JSON files for further analysis.
  • Filtering activities by specific criteria (e.g., date range, user).
  • Aggregating activities (e.g., count per user, average duration).

Properties

Name Type Meaning
Return All boolean Whether to return all results or only up to a given limit. If false, the "Limit" property controls the maximum number of results.
Limit number Maximum number of results to return. Only shown if "Return All" is false.
Split Into Items boolean Whether to output each element of an array as its own item in the workflow.
JSON/RAW Parameters boolean Whether the query/body parameters should be set via the value-key pair UI or as raw JSON.
Body Parameters json Body parameters as JSON or RAW. Used when "JSON/RAW Parameters" is enabled.
Additional Fields collection Extra options for customizing the request, such as aggregation, export, filtering, sorting, grouping, and more.
Aggregate fixedCollection Aggregation functions (e.g., count, sum, average) to perform calculations on fields.
Binary Property for Export Data string Name of the binary property to store exported file data.
Deep (JSON) json Allows setting nested query parameters for related datasets.
Export options Format to save the API response to a file (json, csv, xml).
File Name for Export Data string File name (without extension) for the exported data.
Fields string Controls which fields are returned in the objects.
Filter (JSON) json Conditions to filter items in the collection.
Group By string Field(s) to group results by, enabling grouped aggregations.
Meta string Specifies what metadata to include in the response.
Offset number Number of items to skip (for pagination).
Search string Search query to filter items containing the specified text.
Sort string Sorting instructions for the returned items. Supports ascending, descending, and random order.

Output

  • The node outputs a json field containing the list of activity records matching the specified filters and options.
  • If "Export" is used, the node can output binary data (e.g., CSV, JSON, XML file) under the specified binary property name.
  • When "Split Into Items" is enabled, each activity record is output as a separate item in the workflow.

Dependencies

  • May require authentication or API key configuration depending on the connected service (not specified in the provided code).
  • No external npm dependencies beyond those bundled with the node.

Troubleshooting

  • Common issues:

    • Invalid filter or body parameter JSON may cause errors.
    • Exceeding allowed limits (e.g., setting "Limit" above the maximum) could result in validation errors.
    • Missing required fields when using aggregation or export features.
    • Incorrect binary property name may prevent file export.
  • Error messages and resolutions:

    • "Invalid JSON in filter/body parameters" — Ensure your JSON syntax is correct.
    • "Missing required property" — Check that all required input properties are set.
    • "Unsupported export format" — Only use supported formats: csv, json, xml.

Links and References

Discussion