Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node interacts with the "Attachments" resource of an API to retrieve a single attachment by its unique identifier. It is useful when you need to fetch detailed information about a specific attachment, including optionally related nested objects up to a specified depth level.
Common scenarios include:
- Retrieving metadata or content details of a particular attachment stored in a system.
- Fetching related data linked to the attachment, such as associated user info or parent objects, depending on the depth setting.
- Integrating attachment data into workflows for processing, display, or further automation.
Example: You have an attachment ID from a previous step and want to get all its details along with directly related objects (depth=1) to display in a dashboard or use in conditional logic.
Properties
| Name | Meaning |
|---|---|
| Id | The unique identifier of the attachment object to retrieve. This is required. |
| Depth | Determines how many levels of nested related objects to include in the response: |
| - 0: Only the primary attachment's information. | |
| - 1: The attachment plus its directly related objects (no further nesting). | |
| - 2: The attachment, its directly related objects, and their related objects (two levels deep). |
Output
The node outputs a JSON object representing the requested attachment. The structure includes the attachment's properties and, depending on the Depth parameter, nested related objects up to the specified level.
If the API supports binary data for attachments, this node may also output binary data representing the attachment content, but this is not explicitly shown in the provided code snippet.
Dependencies
- Requires an API key credential to authenticate requests to the Twenty API.
- The base URL for the API is configured via credentials.
- The node uses the OpenAPI specification bundled internally to build request properties and handle communication.
Troubleshooting
- Missing or invalid Id: The node requires a valid attachment ID; ensure it is provided and correctly formatted.
- Authentication errors: Verify that the API key credential is set up properly and has necessary permissions.
- Depth parameter misuse: Using a high depth value may result in large responses or slow performance; adjust according to needs.
- Network or API errors: Check connectivity and API status if requests fail unexpectedly.
Links and References
- Twenty API Documentation (example placeholder, replace with actual)
- n8n documentation on Using Credentials
- n8n documentation on Creating Custom Nodes