TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

The "Find Attachment Duplicates" operation in the Attachments resource is designed to identify duplicate attachments based on specified criteria. This node is useful when you want to detect and handle duplicate files or records within a system that manages attachments, such as document management platforms, CRMs, or content repositories.

Typical use cases include:

  • Cleaning up storage by identifying and removing duplicate attachments.
  • Ensuring data integrity by flagging duplicates before processing.
  • Automating workflows that depend on unique attachment entries.

For example, you might use this node to scan a list of uploaded files and find duplicates by comparing their names or other metadata, then trigger further actions like notifying users or deleting redundant copies.

Properties

Name Meaning
Depth Determines how deeply nested related objects are included in the response:
- 0: Only the primary attachment information.
- 1: Primary attachment plus directly related objects.
- 2: Primary, directly related, and their related objects.
Data JSON array specifying the criteria for finding duplicates. Typically includes fields like attachment name or other attributes to match duplicates against. Example default: [{"name": "Attachment name"}].
Ids JSON array of attachment IDs to limit the search scope. If provided, only these attachments are checked for duplicates. Default is [null], meaning no specific ID filtering.

Output

The node outputs JSON data containing the results of the duplicate search. The structure typically includes the primary attachment objects along with their detected duplicates, respecting the depth level specified.

  • json: Contains the found attachments and their duplicates, including nested related objects depending on the depth setting.
  • No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential to authenticate requests to the external Twenty API service.
  • The node uses the Twenty API base URL configured via credentials.
  • The request headers specify JSON content type and accept JSON responses.

Troubleshooting

  • Invalid JSON in Data or Ids properties: Since these inputs expect JSON arrays, malformed JSON will cause errors. Ensure proper JSON formatting.
  • Authentication errors: Missing or incorrect API credentials will prevent successful API calls.
  • No duplicates found: If the criteria do not match any duplicates, the output may be empty; verify the correctness of the input data.
  • Depth parameter misuse: Setting an unsupported depth value outside 0-2 may lead to unexpected results or errors.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion